vcpkg/ports/sdl1/portfile.cmake

90 lines
3.8 KiB
CMake
Raw Normal View History

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO SDL-Mirror/SDL
REF release-1.2.15
SHA512 38b94a650ec205377ae1503d0ec8a5254ef6d50ed0acac8d985b57b64bc16ea042cfa41e19e5ef8317980c4afb83186829f5bc3da9433d0a649dfd10554801b5
HEAD_REF master
PATCHES
export-symbols-only-in-shared-build.patch
fix-linux-build.patch
)
configure_file(${SOURCE_PATH}/include/SDL_config.h.default ${SOURCE_PATH}/include/SDL_config.h COPYONLY)
if (VCPKG_TARGET_IS_WINDOWS)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/SDL1_2017.sln DESTINATION ${SOURCE_PATH}/VisualC/ )
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
2022-01-25 07:08:18 +08:00
set(LIB_TYPE StaticLibrary)
else()
set(LIB_TYPE DynamicLibrary)
endif()
if (VCPKG_CRT_LINKAGE STREQUAL "dynamic")
set(CRT_TYPE_DBG MultiThreadedDebugDLL)
set(CRT_TYPE_REL MultiThreadedDLL)
else()
set(CRT_TYPE_DBG MultiThreadedDebug)
set(CRT_TYPE_REL MultiThreaded)
endif()
configure_file(${CURRENT_PORT_DIR}/SDL.vcxproj.in ${SOURCE_PATH}/VisualC/SDL/SDL.vcxproj @ONLY)
configure_file(${CURRENT_PORT_DIR}/SDLmain.vcxproj.in ${SOURCE_PATH}/VisualC/SDLmain/SDLmain.vcxproj @ONLY)
# This text file gets copied as a library, and included as one in the package
file(REMOVE_RECURSE ${SOURCE_PATH}/src/hermes/COPYING.LIB)
vcpkg_install_msbuild(
SOURCE_PATH ${SOURCE_PATH}
PROJECT_SUBPATH VisualC/SDL1_2017.sln
INCLUDES_SUBPATH include
LICENSE_SUBPATH COPYING
ALLOW_ROOT_INCLUDES
)
#Take all the fils into include/SDL to sovle conflict with SDL2 port
file(GLOB files ${CURRENT_PACKAGES_DIR}/include/*)
foreach(file ${files})
file(COPY ${file} DESTINATION ${CURRENT_PACKAGES_DIR}/include/SDL)
file(REMOVE ${file})
endforeach()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/SDL/doxyfile)
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link)
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/SDLmain.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/SDLmain.lib)
endif()
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link)
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/SDLmain.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/SDLmaind.lib)
endif()
else()
message("libgles2-mesa-dev must be installed before sdl1 can build. Install it with \"apt install libgles2-mesa-dev\".")
vcpkg_configure_make(
[vcpkg/scripts/pkgconfig] rewrite pkg-config check for libraries (#11550) * [vcpkg/scripts/pkgconfig] rewrite pkgconfig check for libraries. * [vcpkg/scripts/pkgconfig] fix more details. * [vcpkg/scripts/pkgconfig] smaller improvements * ws change to check functionallity of script for testing. * [vcpkg/scripts/pkgconfig] update to latest test version * Revert "ws change to check functionallity of script for testing." This reverts commit 26269e9e776009230777d9390465715f2ebac465. * [nettle] bump control for vcpkg_fixup_pkgconfig test * [gmp] rerun CI to create new *.pc files * [gmp/nettle] enable port debug * [vcpkg/script/pkgconfig] fix path conversion regex for CI * [CI|OSX] install pkg-config on osx * [gmp/nettle] disable port debug * [vcpkg/scripts/pkgconfig] update to latest version of x windows pr * [zlib] add pkgconfig file * [zstd] add fixup pkgconfig * [libpng] add pc file installation * [bzip2] install pc file and leave a TODO for somebody else ;) * [bzip2] bump control * [vcpkg/scripts/pkgconfig] skip checks if pkgconfig cannot be found. - small bugfix in ignore flags regex * retry zstd and zlib * [libpng] retry by adding dl and m to system libraries for osx * [libpng] add missing vcpkg_fixup_pkgconfig() * [vcpkg/scripts/pkgconfig] unset var if found. fixes checks for other configurations which will be always succesful otherwise * [libpng] bump control * [libpng] enable port debug to debug osx regression * ws change to retrigger osx ci and hopeing that it works * fix typo * [libpng] remove -lm flag on apple platforms * ws change to rerun some ports in ci for good measure after the merge with master * Re-trigger CI test * [zstd] add pkgconfig * [zstd] correct debug link * [vcpkg/script/pkgconfig] - add more search suffixes for static libs - add additional debug messages for debuging - fix unsetting of cache variables hiding issues with debug libraries - fixed pkgconfig fix in the debug case * [pcre] add pthread dependency to pcre * [protobuf] fix pkgconfig * include quotes around the prefix in the case the prefix path was quoted (fixes some regressions) add option NOT_STATIC_PKGCONFIG to run pkg-config without the --static argument * [ignition-msgs5] get rid of a dev warning * [apr] fix apr regression * [protobuf] fix protobuf regression * [sdl1] fix regression due to variable expansion of pkg-config. Use similar regex to the library removal for ignored flags. * [ignition] fix regression * remove changes of zlib portfile. * reset changes in osx ci pipeline * add DISABLE_PARALLEL_CONFIGURE Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com> Co-authored-by: Billy Robert O'Neal <bion@microsoft.com>
2020-07-25 02:39:21 +08:00
SOURCE_PATH ${SOURCE_PATH}
)
vcpkg_install_make()
[vcpkg/scripts/pkgconfig] rewrite pkg-config check for libraries (#11550) * [vcpkg/scripts/pkgconfig] rewrite pkgconfig check for libraries. * [vcpkg/scripts/pkgconfig] fix more details. * [vcpkg/scripts/pkgconfig] smaller improvements * ws change to check functionallity of script for testing. * [vcpkg/scripts/pkgconfig] update to latest test version * Revert "ws change to check functionallity of script for testing." This reverts commit 26269e9e776009230777d9390465715f2ebac465. * [nettle] bump control for vcpkg_fixup_pkgconfig test * [gmp] rerun CI to create new *.pc files * [gmp/nettle] enable port debug * [vcpkg/script/pkgconfig] fix path conversion regex for CI * [CI|OSX] install pkg-config on osx * [gmp/nettle] disable port debug * [vcpkg/scripts/pkgconfig] update to latest version of x windows pr * [zlib] add pkgconfig file * [zstd] add fixup pkgconfig * [libpng] add pc file installation * [bzip2] install pc file and leave a TODO for somebody else ;) * [bzip2] bump control * [vcpkg/scripts/pkgconfig] skip checks if pkgconfig cannot be found. - small bugfix in ignore flags regex * retry zstd and zlib * [libpng] retry by adding dl and m to system libraries for osx * [libpng] add missing vcpkg_fixup_pkgconfig() * [vcpkg/scripts/pkgconfig] unset var if found. fixes checks for other configurations which will be always succesful otherwise * [libpng] bump control * [libpng] enable port debug to debug osx regression * ws change to retrigger osx ci and hopeing that it works * fix typo * [libpng] remove -lm flag on apple platforms * ws change to rerun some ports in ci for good measure after the merge with master * Re-trigger CI test * [zstd] add pkgconfig * [zstd] correct debug link * [vcpkg/script/pkgconfig] - add more search suffixes for static libs - add additional debug messages for debuging - fix unsetting of cache variables hiding issues with debug libraries - fixed pkgconfig fix in the debug case * [pcre] add pthread dependency to pcre * [protobuf] fix pkgconfig * include quotes around the prefix in the case the prefix path was quoted (fixes some regressions) add option NOT_STATIC_PKGCONFIG to run pkg-config without the --static argument * [ignition-msgs5] get rid of a dev warning * [apr] fix apr regression * [protobuf] fix protobuf regression * [sdl1] fix regression due to variable expansion of pkg-config. Use similar regex to the library removal for ignored flags. * [ignition] fix regression * remove changes of zlib portfile. * reset changes in osx ci pipeline * add DISABLE_PARALLEL_CONFIGURE Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com> Co-authored-by: Billy Robert O'Neal <bion@microsoft.com>
2020-07-25 02:39:21 +08:00
vcpkg_fixup_pkgconfig(IGNORE_FLAGS -Wl,-rpath,${CURRENT_PACKAGES_DIR}/lib/pkgconfig/../../lib
-Wl,-rpath,${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/../../lib
SYSTEM_LIBRARIES pthread)
file(GLOB SDL1_TOOLS "${CURRENT_PACKAGES_DIR}/bin/*")
foreach (SDL1_TOOL ${SDL1_TOOLS})
file(COPY ${SDL1_TOOL} DESTINATION ${CURRENT_PACKAGES_DIR}/tools)
file(REMOVE ${SDL1_TOOL})
endforeach()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
[vcpkg] Improve make builds (#10402) * update all 16 configure_make ports * add make wrappers for msvc * improve make builds * fix relativ path errors on linux (and osx?) * revisit all 16 portfiles again * remove trace from install * fix relative build path issues. * bump control of the 16 configure ports * never forget .... real linux is case sensitive .... * Revert "bump control of the 16 configure ports" This reverts commit 40d6d81c01d2709c4acbdbec503b4787c3fd8282. * Revert "Revert "bump control of the 16 configure ports"" This reverts commit 9c9851ddfcd01bfad604ab9c9aed7379238d619a. * bump control again for real ci rebuild * add copy_source * remove message * pass parameters to vcpkg_build_make * fix healpix build. * fix libmagic regression * fix libwandio regression * pfring changes regression fix? (cannot test in wsl) * ws change to retrigger CI * fix libpq regression * fix libudns regression * add share/pkgconfig to PKG_CONFIG_PATH * cleanup of deprecated options * cleanup docs * Revert "bump control again for real ci rebuild" This reverts commit b4bc18edc2376eba6c3aa3dda52bd82286f23616. * shared binaries on linux should stay in lib. Only dlls are mvoed to bin * move pkgconfig check and add message about missing system packages * added autopoint as a build requirement * fix prerun shell working dir. * a few fixes from the x windows pr - add libpath setting - fixed pkgconfig search on windows platforms - fixed autopoint msys package on windows * fix release prefix * minimal cleanup and ws changes to trigger true CI rebuild * fix tcl by upgrading * remove unnecessary rename * fix pfring? can't test in WSL. Linux kernel headers required. * fix lowercase in patch * fix libwandio * remove x264 from fail list * replace wrappers with wrappers from automake * update make ports * remove unnecessary message * refactor vcpkg_configure_make * [tcl] remove stray ? * [farmhash] fix build * [freexl] ws change to retrigger ci build * [x264] add pthread as a dependency * [vcpkg/scripts] add ignore flag correctly * [sdl] fix vcpkg_fixup_pkgconfig call * [farmhash/freexl] delete configure and recreate it. * [libudns] remove trailing ? * [freexl] use empty build target * [freexl] add system library; remove previous change * Update ports/x264/portfile.cmake Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * [libwandio] remove unncessary comment Co-authored-by: dan-shaw <51385773+dan-shaw@users.noreply.github.com> Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
2020-05-22 01:46:07 +08:00
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
2022-01-25 07:08:18 +08:00
if(EXISTS "${CURRENT_PACKAGES_DIR}/tools/sdl1/bin/sdl-config")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/sdl1/bin/sdl-config" "${CURRENT_INSTALLED_DIR}" "`dirname $0`/../../..")
endif()
if(EXISTS "${CURRENT_PACKAGES_DIR}/tools/sdl1/debug/bin/sdl-config")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/sdl1/debug/bin/sdl-config" "${CURRENT_INSTALLED_DIR}" "`dirname $0`/../../..")
endif()
endif()