diff options
author | jbeich <jbeich@FreeBSD.org> | 2018-01-01 21:42:54 +0800 |
---|---|---|
committer | jbeich <jbeich@FreeBSD.org> | 2018-01-01 21:42:54 +0800 |
commit | 19a63bf6383364ed5252a57b59c80c095b02cf7b (patch) | |
tree | 38db9f1d8ee32af4ab5c52ef2f7c2b9aef2a174d | |
parent | be214fa55f98d07d26bc2bc15cbea7862456485c (diff) | |
download | freebsd-ports-gnome-19a63bf6383364ed5252a57b59c80c095b02cf7b.tar.gz freebsd-ports-gnome-19a63bf6383364ed5252a57b59c80c095b02cf7b.tar.zst freebsd-ports-gnome-19a63bf6383364ed5252a57b59c80c095b02cf7b.zip |
Improve CMake style in my ports
- Convert to CMAKE_{ON,OFF} helpers
- Convert to _CMAKE_BOOL option helpers
- android-file-transfer: Share _CMAKE_BOOL via _IMPLIES
- Annotate types
-rw-r--r-- | emulators/ppsspp/Makefile | 3 | ||||
-rw-r--r-- | emulators/rpcs3/Makefile | 2 | ||||
-rw-r--r-- | games/aquaria/Makefile | 22 | ||||
-rw-r--r-- | graphics/colmap/Makefile | 2 | ||||
-rw-r--r-- | graphics/waifu2x-converter-cpp/Makefile | 10 | ||||
-rw-r--r-- | math/ceres-solver/Makefile | 15 | ||||
-rw-r--r-- | sysutils/android-file-transfer/Makefile | 20 |
7 files changed, 40 insertions, 34 deletions
diff --git a/emulators/ppsspp/Makefile b/emulators/ppsspp/Makefile index 6b699d087cc1..4d82fef3a2cc 100644 --- a/emulators/ppsspp/Makefile +++ b/emulators/ppsspp/Makefile @@ -35,7 +35,8 @@ EXCLUDE= libzip zlib EXTRACT_AFTER_ARGS=${EXCLUDE:S,^,--exclude ,} USE_GL= gl glew glu USE_SDL= sdl2 # joystick -CMAKE_ARGS= -DUSING_EGL=off -DUSE_SYSTEM_FFMPEG=on +CMAKE_ON= USE_SYSTEM_FFMPEG +CMAKE_OFF= USING_EGL SUB_FILES= pkg-message PORTDATA= assets ${PORTNAME} diff --git a/emulators/rpcs3/Makefile b/emulators/rpcs3/Makefile index 7969a5d6c831..16be7eca32e2 100644 --- a/emulators/rpcs3/Makefile +++ b/emulators/rpcs3/Makefile @@ -40,7 +40,7 @@ USE_XORG= x11 EXTRA_PATCHES+= ${EXTRA_PATCHES_${OPSYS}_${OSREL}} EXTRA_PATCHES_FreeBSD_10.3= ${PATCHDIR}/extra-patch-no-thread_local CONFIGURE_ENV+= TRAVIS=1 # XXX Rename to be less generic -CMAKE_ARGS+= -DCMAKE_SKIP_RPATH=on -DUSE_SYSTEM_LIBPNG=on -DUSE_SYSTEM_FFMPEG=on +CMAKE_ON= CMAKE_SKIP_RPATH USE_SYSTEM_FFMPEG USE_SYSTEM_LIBPNG CXXFLAGS+= -D_GLIBCXX_USE_C99 # XXX ports/193528 CXXFLAGS+= -Wno-macro-redefined # __STDC_*_MACROS sys/cdefs.h vs. llvm-config LDFLAGS+= -Wl,--as-needed # GLU diff --git a/games/aquaria/Makefile b/games/aquaria/Makefile index ad61f79925a7..64e6d9328836 100644 --- a/games/aquaria/Makefile +++ b/games/aquaria/Makefile @@ -26,16 +26,16 @@ USES= cmake lua:51 openal pkgconfig EXCLUDE= AL FTGL GL SDL* freetype2 glm glpng/png glpng/zlib \ libogg-* libvorbis-* lua-* tinyxml2* EXTRACT_AFTER_ARGS=${EXCLUDE:S,^,--exclude ExternalLibs/,} -CMAKE_ARGS+= -DAQUARIA_DEFAULT_DATA_DIR="${DATADIR}" \ - -DAQUARIA_INTERNAL_FREETYPE=off \ - -DAQUARIA_INTERNAL_FTGL=off \ - -DAQUARIA_INTERNAL_LUA=off \ - -DAQUARIA_INTERNAL_OGGVORBIS=off \ - -DAQUARIA_INTERNAL_OPENAL=off \ - -DAQUARIA_INTERNAL_PNG=off \ - -DAQUARIA_INTERNAL_SDL=off \ - -DAQUARIA_INTERNAL_TINYXML2=off \ - -DAQUARIA_INTERNAL_ZLIB=off +CMAKE_ARGS= AQUARIA_DEFAULT_DATA_DIR:PATH="${DATADIR}" +CMAKE_OFF= AQUARIA_INTERNAL_FREETYPE \ + AQUARIA_INTERNAL_FTGL \ + AQUARIA_INTERNAL_LUA \ + AQUARIA_INTERNAL_OGGVORBIS \ + AQUARIA_INTERNAL_OPENAL \ + AQUARIA_INTERNAL_PNG \ + AQUARIA_INTERNAL_SDL \ + AQUARIA_INTERNAL_TINYXML2 \ + AQUARIA_INTERNAL_ZLIB LDFLAGS+= -Wl,--as-needed # avoid overlinking (vorbis deps) SUB_FILES= pkg-message PLIST_FILES= bin/aquaria @@ -52,7 +52,7 @@ OPTIONS_DEFINE= DEBUG SDL2 OPTIONS_DEFAULT=SDL2 SDL2_DESC= Use SDL 2.x instead of SDL 1.2.x -SDL2_CMAKE_ON= -DAQUARIA_USE_SDL2=on +SDL2_CMAKE_BOOL=AQUARIA_USE_SDL2 SDL2_USE= SDL=sdl2 SDL2_USE_OFF= SDL=sdl diff --git a/graphics/colmap/Makefile b/graphics/colmap/Makefile index 406dee01ad8a..89443b2a5a27 100644 --- a/graphics/colmap/Makefile +++ b/graphics/colmap/Makefile @@ -30,7 +30,7 @@ USE_GL= gl glew USE_QT5= qmake_build buildtools_build core gui opengl_build widgets EXCLUDE= SQLite EXTRACT_AFTER_ARGS= ${EXCLUDE:S,^,--exclude src/ext/,} -CMAKE_ARGS= -DBOOST_STATIC=off -DCUDA_ENABLED=off +CMAKE_OFF= BOOST_STATIC CUDA_ENABLED CFLAGS+= -DVL_OS_LINUX=1 CXXFLAGS+= -D_GLIBCXX_USE_C99 -D_GLIBCXX_USE_C99_MATH_TR1 \ -D_DECLARE_C99_LDBL_MATH # XXX ports/193528 diff --git a/graphics/waifu2x-converter-cpp/Makefile b/graphics/waifu2x-converter-cpp/Makefile index 1b80d75f2a3c..0c4080673fa8 100644 --- a/graphics/waifu2x-converter-cpp/Makefile +++ b/graphics/waifu2x-converter-cpp/Makefile @@ -23,9 +23,9 @@ GH_ACCOUNT= tanakamura USES= cmake compiler:c++11-lib dos2unix DOS2UNIX_GLOB= *.cpp *.hpp -CMAKE_ARGS= -DOPENCV_PREFIX="${LOCALBASE}" \ - -DOpenCL_LIBRARY="${LOCALBASE}/lib/libOpenCL.so" \ - -DINSTALL_MODELS=on +CMAKE_ARGS= -DOPENCV_PREFIX:PATH="${LOCALBASE}" \ + -DOpenCL_LIBRARY:FILEPATH="${LOCALBASE}/lib/libOpenCL.so" +CMAKE_ON= INSTALL_MODELS CFLAGS+= -D_GLIBCXX_USE_C99 -D_GLIBCXX_USE_C99_MATH_TR1 \ -D_DECLARE_C99_LDBL_MATH # XXX ports/193528 LDFLAGS+= -Wl,--as-needed # avoid overlinking (opencv deps) @@ -40,8 +40,8 @@ PORTDOCS= * OPTIONS_DEFINE= DOCS SIMD OPTIONS_DEFAULT=SIMD -DOCS_CMAKE_ON= -DINSTALL_DOCS=on -SIMD_CMAKE_OFF= -DARMOPT=off -DX86OPT=off +DOCS_CMAKE_BOOL=INSTALL_DOCS +SIMD_CMAKE_OFF= -DARMOPT:BOOL=false -DX86OPT:BOOL=false post-patch: @${REINPLACE_CMD} -e '/Darwin/,/FLAGS_RELEASE/d' \ diff --git a/math/ceres-solver/Makefile b/math/ceres-solver/Makefile index 5c1500585a41..9c8909e64d17 100644 --- a/math/ceres-solver/Makefile +++ b/math/ceres-solver/Makefile @@ -23,7 +23,7 @@ USE_GITHUB= yes USE_LDCONFIG= yes SHEBANG_FILES= examples/slam/pose_graph_*/plot_results.py \ scripts/make_docs.py -CMAKE_ARGS= -DCXX11=on -DBUILD_SHARED_LIBS=on +CMAKE_ON= CXX11 BUILD_SHARED_LIBS LDFLAGS+= -Wl,--as-needed # -lccolamd -lcholmod -lrt from suitesparse PLIST_SUB= VERSION=${DISTVERSION:C/rc.*//} EXAMPLESDIR= ${PREFIX}/share/examples/${PORTNAME:S/-solver//} @@ -67,26 +67,27 @@ TEST_IMPLIES= GFLAGS LAPACK_DESC= Linear Algebra PACKage LAPACK_USES= fortran # LDFLAGS -LAPACK_CMAKE_ON= -DBLAS_LIBRARIES="${BLASLIB}" -DLAPACK_LIBRARIES="${LAPACKLIB}" +LAPACK_CMAKE_ON= -DBLAS_LIBRARIES:FILEPATH="${BLASLIB}" \ + -DLAPACK_LIBRARIES:FILEPATH="${LAPACKLIB}" LAPACK_CMAKE_BOOL= LAPACK ATLAS_USES= blaslapack:atlas -ATLAS_CMAKE_ON= -DBLA_VENDOR="ATLAS" +ATLAS_CMAKE_ON= -DBLA_VENDOR:STRING="ATLAS" ATLAS_IMPLIES= LAPACK GOTOBLAS_DESC= Goto blas implementation GOTOBLAS_USES= blaslapack:gotoblas -GOTOBLAS_CMAKE_ON= -DBLA_VENDOR="Goto" +GOTOBLAS_CMAKE_ON= -DBLA_VENDOR:STRING="Goto" GOTOBLAS_IMPLIES= LAPACK NETLIB_USES= blaslapack:netlib -NETLIB_CMAKE_ON= -DBLA_VENDOR="Generic" +NETLIB_CMAKE_ON= -DBLA_VENDOR:STRING="Generic" NETLIB_IMPLIES= LAPACK OPENBLAS_USES= blaslapack:openblas -OPENBLAS_CMAKE_ON= -DBLA_VENDOR="OpenBLAS" +OPENBLAS_CMAKE_ON= -DBLA_VENDOR:STRING="OpenBLAS" OPENBLAS_IMPLIES= LAPACK SPARSE_DESC= Sparse linear algebra library CXSPARSE_DESC= CXSparse support CXSPARSE_LIB_DEPENDS= libcxsparse.so:math/suitesparse -CXSPARSE_CMAKE_ON= -DCXSPARSE_INCLUDE_DIR="${LOCALBASE}/include/suitesparse" +CXSPARSE_CMAKE_ON= -DCXSPARSE_INCLUDE_DIR:PATH="${LOCALBASE}/include/suitesparse" CXSPARSE_CMAKE_BOOL= CXSPARSE EIGENSPARSE_DESC= Simplicial Cholesky factorization in Eigen EIGENSPARSE_CMAKE_BOOL= EIGENSPARSE diff --git a/sysutils/android-file-transfer/Makefile b/sysutils/android-file-transfer/Makefile index 0ac412976266..478aac3a1c06 100644 --- a/sysutils/android-file-transfer/Makefile +++ b/sysutils/android-file-transfer/Makefile @@ -16,13 +16,14 @@ GH_ACCOUNT= whoozle GH_PROJECT= ${PORTNAME}-linux USES= cmake compiler:c++11-lib localbase:ldflags pkgconfig -CMAKE_ARGS= -DUSB_BACKEND_LIBUSB=on -DBUILD_QT_UI=off +CMAKE_ON= USB_BACKEND_LIBUSB OPTIONS_DEFAULT=CLI FUSE OPTIONS_MULTI= COMP OPTIONS_MULTI_COMP= CLI FUSE OPTIONS_RADIO= GUI -OPTIONS_RADIO_GUI= QT4 QT5 +OPTIONS_RADIO_GUI= QT QT4 QT5 +OPTIONS_SLAVE:= ${OPTIONS_SLAVE} ${OPTIONS_SLAVE:MQT*:C/.+/QT/} # XXX ports/202701 OPTIONS_EXCLUDE:= ${OPTIONS_EXCLUDE} ${OPTIONS_RADIO_GUI} # XXX http://lists.dragonflybsd.org/pipermail/users/2016-September/313064.html OPTIONS_EXCLUDE_DragonFly= FUSE @@ -37,15 +38,18 @@ FUSE_USES= fuse FUSE_CMAKE_BOOL=BUILD_FUSE FUSE_PLIST_FILES=bin/aft-mtp-mount +QT_CMAKE_BOOL= BUILD_QT_UI +QT_PLIST_FILES=bin/android-file-transfer \ + share/applications/android-file-transfer.desktop \ + share/icons/hicolor/128x128/apps/android-file-transfer.png + QT4_USE= QT4=qmake_build,moc_build,rcc_build,uic_build,corelib,gui -QT4_CMAKE_ON= -DBUILD_QT_UI=on -DDESIRED_QT_VERSION=4 -QT4_PLIST_FILES=${QT5_PLIST_FILES} +QT4_CMAKE_ON= -DDESIRED_QT_VERSION:STRING=4 +QT4_IMPLIES= QT QT5_USE= QT5=qmake_build,buildtools_build,core,gui,widgets -QT5_CMAKE_ON= -DBUILD_QT_UI=on -DDESIRED_QT_VERSION=5 -QT5_PLIST_FILES=bin/android-file-transfer \ - share/applications/android-file-transfer.desktop \ - share/icons/hicolor/128x128/apps/android-file-transfer.png +QT5_CMAKE_ON= -DDESIRED_QT_VERSION:STRING=5 +QT5_IMPLIES= QT post-patch: @${REINPLACE_CMD} '/set.*AFT_VERSION/s/".*"/"${GH_TAGNAME}"/' \ |