1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-23 04:23:08 +00:00

- Remove useless USE_GCC (should fix build where Clang is the default compiler)

- Use new options framework
- Rename CMakeLists' USE_ICONV option to ICONV_LINK
This commit is contained in:
Ganael LAPLANCHE 2014-01-21 07:26:24 +00:00
parent 4e70150b72
commit 041fdb5edb
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=340561
2 changed files with 35 additions and 54 deletions

View File

@ -27,8 +27,6 @@ USE_WX= 2.9+
WX_UNICODE= yes
USE_GL= gl glew glu
USE_GCC= yes
USES= dos2unix cmake iconv openal pkgconfig
DOS2UNIX_REGEX= .*\.(h|c|cpp)
@ -40,61 +38,44 @@ CMAKE_ARGS+= -DOPENMP:BOOL=OFF \
-DUSE_X11:BOOL=ON \
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=ON
OPTIONS_DEFINE= PULSEAUDIO PORTAUDIO DEBUG FRAMEDUMPS UPNP
OPTIONS_DEFINE= PULSEAUDIO PORTAUDIO DEBUG FRAMEDUMPS UPNP NLS
OPTIONS_DEFAULT= PORTAUDIO FRAMEDUMPS UPNP NLS
OPTIONS_SUB= yes
PULSEAUDIO_LIB_DEPENDS= libpulse.so:${PORTSDIR}/audio/pulseaudio
PULSEAUDIO_CMAKE_ON= -DDISABLE_PULSEAUDIO:BOOL=OFF
PULSEAUDIO_CMAKE_OFF= -DDISABLE_PULSEAUDIO:BOOL=ON
PORTAUDIO_DESC= Enable PortAudio (mic) support
PORTAUDIO_LIB_DEPENDS= libportaudio.so.2:${PORTSDIR}/audio/portaudio2
PORTAUDIO_CMAKE_ON= -DDISABLE_PORTAUDIO:BOOL=OFF
PORTAUDIO_CMAKE_OFF= -DDISABLE_PORTAUDIO:BOOL=ON
DEBUG_MAKE_ENV= VERBOSE=yes
DEBUG_CMAKE_ON= -DFASTLOG:BOOL=ON
DEBUG_CMAKE_OFF= -DFASTLOG:BOOL=OFF
FRAMEDUMPS_DESC= Encode framedumps in AVI format
OPTIONS_DEFAULT= PORTAUDIO FRAMEDUMPS UPNP
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MNLS}
USES+= gettext
PLIST_SUB+= NLS=""
.else
CMAKE_ARGS+= -DDISABLE_NLS:BOOL=ON
PLIST_SUB+= NLS="@comment "
.endif
.if ${PORT_OPTIONS:MDEBUG}
CMAKE_ARGS+= -DFASTLOG:BOOL=ON
MAKE_ENV+= VERBOSE=yes
.endif
.if ${PORT_OPTIONS:MPULSEAUDIO}
LIB_DEPENDS+= libpulse.so:${PORTSDIR}/audio/pulseaudio
.else
CMAKE_ARGS+= -DDISABLE_PULSEAUDIO:BOOL=ON
.endif
.if ${PORT_OPTIONS:MPORTAUDIO}
LIB_DEPENDS+= libportaudio.so.2:${PORTSDIR}/audio/portaudio2
.else
CMAKE_ARGS+= -DDISABLE_PORTAUDIO:BOOL=ON
.endif
.if ${PORT_OPTIONS:MFRAMEDUMPS}
CMAKE_ARGS+= -DENCODE_FRAMEDUMPS:BOOL=ON
LIB_DEPENDS+= libavcodec.so:${PORTSDIR}/multimedia/ffmpeg \
libavformat.so:${PORTSDIR}/multimedia/ffmpeg \
libswscale.so:${PORTSDIR}/multimedia/ffmpeg \
libavutil.so:${PORTSDIR}/multimedia/ffmpeg
.else
CMAKE_ARGS+= -DENCODE_FRAMEDUMPS:BOOL=OFF
.endif
.if ${PORT_OPTIONS:MUPNP}
CMAKE_ARGS+= -DUSE_UPNP:BOOL=ON
LIB_DEPENDS+= libminiupnpc.so:${PORTSDIR}/net/miniupnpc
.else
CMAKE_ARGS+= -DUSE_UPNP:BOOL=OFF
.endif
FRAMEDUMPS_LIB_DEPENDS= libavcodec.so:${PORTSDIR}/multimedia/ffmpeg \
libavformat.so:${PORTSDIR}/multimedia/ffmpeg \
libswscale.so:${PORTSDIR}/multimedia/ffmpeg \
libavutil.so:${PORTSDIR}/multimedia/ffmpeg
FRAMEDUMPS_CMAKE_ON= -DENCODE_FRAMEDUMPS:BOOL=ON
FRAMEDUMPS_CMAKE_OFF= -DENCODE_FRAMEDUMPS:BOOL=OFF
UPNP_LIB_DEPENDS= libminiupnpc.so:${PORTSDIR}/net/miniupnpc
UPNP_CMAKE_ON= -DUSE_UPNP:BOOL=ON
UPNP_CMAKE_OFF= -DUSE_UPNP:BOOL=OFF
NLS_USES= gettext
NLS_CMAKE_ON= -DDISABLE_NLS:BOOL=OFF
NLS_CMAKE_OFF= -DDISABLE_NLS:BOOL=ON
.include <bsd.port.pre.mk>
# XXX Temporary workaround for ports/184540
.if ${PORT_OPTIONS:MDEBUG}
INSTALL_TARGET= install
.endif
.if !empty(ICONV_LIB)
CMAKE_ARGS+= -DUSE_ICONV:BOOL=ON
CMAKE_ARGS+= -DICONV_LINK:BOOL=ON
.else
CMAKE_ARGS+= -DUSE_ICONV:BOOL=OFF
CMAKE_ARGS+= -DICONV_LINK:BOOL=OFF
.endif
.include <bsd.port.post.mk>

View File

@ -14,12 +14,12 @@
else()
- set(LIBS ${LIBS} png iconv)
+ set(LIBS ${LIBS} png)
+ set(USE_ICONV True)
+ set(ICONV_LINK True)
+endif()
+
+if(USE_ICONV)
+ message( "-- Adding iconv")
+ set(LIBS ${LIBS} iconv)
+if(ICONV_LINK)
+ message( "-- Linking to libiconv")
+ set(LIBS ${LIBS} iconv)
endif()
if(LIBAV_FOUND)