svn commit: r457776 - in head: emulators/ppsspp emulators/rpcs3 games/aquaria graphics/colmap graphics/waifu2x-converter-cpp math/ceres-solver sysutils/android-file-transfer
Jan Beich
jbeich at FreeBSD.org
Mon Jan 1 13:42:56 UTC 2018
Author: jbeich
Date: Mon Jan 1 13:42:54 2018
New Revision: 457776
URL: https://svnweb.freebsd.org/changeset/ports/457776
Log:
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
Modified:
head/emulators/ppsspp/Makefile (contents, props changed)
head/emulators/rpcs3/Makefile (contents, props changed)
head/games/aquaria/Makefile (contents, props changed)
head/graphics/colmap/Makefile (contents, props changed)
head/graphics/waifu2x-converter-cpp/Makefile (contents, props changed)
head/math/ceres-solver/Makefile (contents, props changed)
head/sysutils/android-file-transfer/Makefile (contents, props changed)
Modified: head/emulators/ppsspp/Makefile
==============================================================================
--- head/emulators/ppsspp/Makefile Mon Jan 1 13:34:56 2018 (r457775)
+++ head/emulators/ppsspp/Makefile Mon Jan 1 13:42:54 2018 (r457776)
@@ -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}
Modified: head/emulators/rpcs3/Makefile
==============================================================================
--- head/emulators/rpcs3/Makefile Mon Jan 1 13:34:56 2018 (r457775)
+++ head/emulators/rpcs3/Makefile Mon Jan 1 13:42:54 2018 (r457776)
@@ -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
Modified: head/games/aquaria/Makefile
==============================================================================
--- head/games/aquaria/Makefile Mon Jan 1 13:34:56 2018 (r457775)
+++ head/games/aquaria/Makefile Mon Jan 1 13:42:54 2018 (r457776)
@@ -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
Modified: head/graphics/colmap/Makefile
==============================================================================
--- head/graphics/colmap/Makefile Mon Jan 1 13:34:56 2018 (r457775)
+++ head/graphics/colmap/Makefile Mon Jan 1 13:42:54 2018 (r457776)
@@ -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
Modified: head/graphics/waifu2x-converter-cpp/Makefile
==============================================================================
--- head/graphics/waifu2x-converter-cpp/Makefile Mon Jan 1 13:34:56 2018 (r457775)
+++ head/graphics/waifu2x-converter-cpp/Makefile Mon Jan 1 13:42:54 2018 (r457776)
@@ -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' \
Modified: head/math/ceres-solver/Makefile
==============================================================================
--- head/math/ceres-solver/Makefile Mon Jan 1 13:34:56 2018 (r457775)
+++ head/math/ceres-solver/Makefile Mon Jan 1 13:42:54 2018 (r457776)
@@ -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
Modified: head/sysutils/android-file-transfer/Makefile
==============================================================================
--- head/sysutils/android-file-transfer/Makefile Mon Jan 1 13:34:56 2018 (r457775)
+++ head/sysutils/android-file-transfer/Makefile Mon Jan 1 13:42:54 2018 (r457776)
@@ -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}"/' \
More information about the svn-ports-all
mailing list