1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-14 23:30:23 +02:00

Fix non-cmake buildable minsrc tarball

This commit is contained in:
Leland Lucius 2020-04-25 02:15:05 -05:00
parent 06c36f7fe6
commit ef28b9214b
2 changed files with 27 additions and 12 deletions

View File

@ -12,12 +12,19 @@ def_vars()
list( APPEND EXCLUDES
.git
.gitattributes
.github
.gitignore
lib-src/expat
lib-src/libid3tag
lib-src/libmad
lib-src/libogg
lib-src/libscorealign
.travis.yml
appveyor.yml
autotools
configure
configure.ac
# lib-src/expat
# lib-src/libid3tag
# lib-src/libmad
# lib-src/libogg
# lib-src/libscorealign
# lib-src/libvorbis
lib-src/portaudio-v19/bindings
lib-src/portaudio-v19/doc
lib-src/portaudio-v19/testcvs
@ -29,21 +36,21 @@ list( APPEND EXCLUDES
lib-src/portmidi/pm_qt
lib-src/portmidi/pm_test
lib-src/portmidi/portmidi_cdt.zip
lib-src/soundtouch
lib-src/libvorbis
# lib-src/soundtouch
m4
mac
plug-ins/analyze.ny
plug-ins/fadein.ny
plug-ins/fadeout.ny
plug-ins/undcbias.ny
qa
scripts
tests/ProjectCheckTests
todo.txt
win
)
set( TARBALL "${PROJECT_BINARY_DIR}/audacity-minsrc-${AUDACITY_DIST_VERSION}${AUDACITY_SUFFIX}.tar.xz" )
set( TLD "audacity-minsrc-${AUDACITY_DIST_VERSION}${AUDACITY_SUFFIX}" )
set( TARBALL "${PROJECT_BINARY_DIR}/${TLD}.tar.xz" )
add_custom_target( ${TARGET}
COMMAND
@ -51,6 +58,7 @@ add_custom_target( ${TARGET}
-D TARGET_ROOT="${TARGET_ROOT}"
-D EXCLUDES="${EXCLUDES}"
-D TARBALL="${TARBALL}"
-D TLD="${TLD}"
-P "${_SRCDIR}/maketarball.cmake"
)

View File

@ -35,7 +35,10 @@ string( REPLACE "\n" ";" output "${output}" )
string( REPLACE " " ".*$|^" EXCLUDES "${EXCLUDES}" )
# Remove unwanted files from the list
list( FILTER output EXCLUDE REGEX "^${EXCLUDES}.*$" )
list( FILTER output EXCLUDE REGEX "^${EXCLUDES}.*$|^$" )
# Add our TLD to each filename
list( TRANSFORM output PREPEND "${TLD}/" )
message( STATUS "Creating the minsrc archive at:" )
message( STATUS )
@ -47,11 +50,15 @@ set( filelist "${CMAKE_CURRENT_BINARY_DIR}/filelist" )
string( REPLACE ";" "\n" output "${output}" )
file( WRITE "${filelist}" ${output} )
# Create a symlink to provide a TLD
execute_process(
COMMAND
${CMAKE_COMMAND} -E create_symlink ${TARGET_ROOT} ${TLD}
)
# Create the tarball
execute_process(
COMMAND
${CMAKE_COMMAND} -E tar cfJ ${TARBALL} --files-from=${filelist}
WORKING_DIRECTORY
${TARGET_ROOT}
)