3a55a118dd
These were FreeBSD specific aliases for libiconv(), libiconv_open() and libiconv_close() that are now also provided by libc which complicates writing configure tests that work correctly when both libc iconv and libiconv are available. Also, because the libiconv iconv.h header redefines iconv* to libiconv* correct use of the header implies that the aliases aren't used. The following ports needed fixes because there was something wrong with the way they tried to detect or use iconv: audio/deadbeef: Remove LIBICONV_PLUG from a source file. It's a compile-time option and should not be set in source code. comms/hidapi: Use standard AM_ICONV configure macro to look for iconv. deskutils/fbreader: Let ports framework deal with LIBICONV_PLUG. deskutils/ljclive: Override configure test for iconv. deskutils/owncloudclient: Add USES=iconv and patch test for iconv. devel/aegis: Bump PORTREVISION because it no longer uses libiconv. devel/libexplain: Add USES=iconv and override test for iconv. devel/sdl20: Override configure test for iconv. emulators/vmw: Replace OSVERSION checks with ICONV_LIB checks and include <iconv.h> instead of <sys/iconv.h>. irc/scrollz: Override configure test for iconv. japanese/chasen-base: Override configure test for iconv and patch configure so it no longer adds -liconv to linker flags just because it happens to be installed. japanses/eb: Patch configure test for iconv. japanses/eblook: Override configure test for iconv. java/jikes: Override configure test for iconv. multimedia/transcode: Bump PORTREVISION because only one plugin links with libiconv now. net/c3270: Override configure test for iconv. net/samba4*: Bump PORTREVISION because it no longer uses libiconv. The configure script will always add -liconv to the linker flags when it happens to be installed which would be wrong but later on binaries are linked with -Wl,--as-needed and the linker discards -liconv because it finds iconv*() functions in libc now and no longer in libiconv. net-mgmt/icinga-*: Remove dependency on iconv. net-mgmt/netxms: Patch configure so it no longer adds -liconv to linker flags just because it happens to be installed. net/asterisk11: Patch configure so it no longer adds -liconv to linker flags just because it happens to be installed. net-p2p/transmission-*: Override configure test for iconv. www/htmlcxx: Override configure test for iconv. www/httrack: Override configure test for iconv. www/xapian-omega: Override configure test for iconv. x11/mrxvt(-devel): Add USES=iconv and override configure test for iconv. x11/x3270: Override configure test for iconv. x11-wm/jwm: Override configure test for iconv. PR: 202838 Exp-run by: antoine Approved by: portmgr (antoine)
202 lines
5.8 KiB
Makefile
202 lines
5.8 KiB
Makefile
# $FreeBSD$
|
|
|
|
PORTNAME= sdl2
|
|
PORTVERSION= 2.0.3
|
|
PORTREVISION= 6
|
|
CATEGORIES= devel
|
|
MASTER_SITES= http://www.libsdl.org/release/
|
|
DISTNAME= SDL2-${PORTVERSION}
|
|
|
|
MAINTAINER= mva@FreeBSD.org
|
|
COMMENT= Cross-platform multimedia development API
|
|
|
|
LICENSE= ZLIB
|
|
|
|
GNU_CONFIGURE= yes
|
|
USES= gmake iconv libtool pathfix pkgconfig
|
|
USE_LDCONFIG= yes
|
|
|
|
CONFIGURE_ARGS+= --disable-video-opengles \
|
|
--disable-altivec \
|
|
--disable-arts \
|
|
--enable-diskaudio \
|
|
--enable-dummyaudio \
|
|
--enable-video-dummy \
|
|
--disable-dbus \
|
|
--disable-input-tslib \
|
|
--disable-rpath
|
|
.if defined(MACHINE_CPU) && ${MACHINE_CPU:Mmmx}
|
|
CONFIGURE_ARGS+= --enable-mmx
|
|
.else
|
|
CONFIGURE_ARGS+= --disable-mmx
|
|
.endif
|
|
.if defined(MACHINE_CPU) && ${MACHINE_CPU:M3dnow}
|
|
CONFIGURE_ARGS+= --enable-3dnow
|
|
.else
|
|
CONFIGURE_ARGS+= --disable-3dnow
|
|
.endif
|
|
.if defined(MACHINE_CPU) && ${MACHINE_CPU:Msse}
|
|
CONFIGURE_ARGS+= --enable-sse
|
|
.else
|
|
CONFIGURE_ARGS+= --disable-sse
|
|
.endif
|
|
.if defined(MACHINE_CPU) && ${MACHINE_CPU:Msse2}
|
|
CONFIGURE_ARGS+= --enable-sse2
|
|
.else
|
|
CONFIGURE_ARGS+= --disable-sse2
|
|
.endif
|
|
|
|
CPPFLAGS+= -I${LOCALBASE}/include
|
|
LDFLAGS+= -L${LOCALBASE}/lib
|
|
|
|
|
|
OPTIONS_DEFINE= ALSA ASM DLOPEN ESOUND NAS OSS \
|
|
PULSEAUDIO PTHREADS SDL_ATOMIC SDL_AUDIO \
|
|
SDL_CPUINFO SDL_EVENTS SDL_FILE SDL_HAPTIC \
|
|
SDL_JOYSTICK SDL_LOADSO SDL_POWER SDL_RENDER \
|
|
SDL_THREADS SDL_TIMERS SDL_VIDEO VIDEO_OPENGL VIDEO_X11
|
|
OPTIONS_DEFAULT= ASM DLOPEN OSS PTHREADS SDL_ATOMIC SDL_AUDIO \
|
|
SDL_CPUINFO SDL_EVENTS SDL_FILE SDL_HAPTIC \
|
|
SDL_JOYSTICK SDL_LOADSO SDL_POWER SDL_RENDER \
|
|
SDL_THREADS SDL_TIMERS SDL_VIDEO VIDEO_OPENGL VIDEO_X11
|
|
|
|
ALSA_DESC= Audio output via the ALSA audio architecture
|
|
DLOPEN_DESC= Use dlopen for loading 3rd party libraries
|
|
ESOUND_DESC= Audio output via the EsounD sound server
|
|
NAS_DESC= Audio output via the Network Audio System
|
|
OSS_DESC= Audio output via the Open Sound System
|
|
PULSEAUDIO_DESC= Audio output via the PulseAudio sound server
|
|
PTHREADS_DESC= Use POSIX threads for multi-threading
|
|
SDL_ATOMIC_DESC= Enable the SDL Atomic subsystem
|
|
SDL_AUDIO_DESC= Enable the SDL Audio subsystem
|
|
SDL_CPUINFO_DESC= Enable the SDL CPUinfo subsystem
|
|
SDL_EVENTS_DESC= Enable the SDL Events subsystem
|
|
SDL_FILE_DESC= Enable the SDL File subsystem
|
|
SDL_HAPTIC_DESC= Enable the SDL Haptic subsystem
|
|
SDL_JOYSTICK_DESC= Enable the SDL Joystick subsystem
|
|
SDL_LOADSO_DESC= Enable the SDL Loadso subsystem
|
|
SDL_POWER_DESC= Enable the SDL Power subsystem
|
|
SDL_RENDER_DESC= Enable the SDL Render subsystem
|
|
SDL_THREADS_DESC= Enable the SDL Threads subsystem
|
|
SDL_TIMERS_DESC= Enable the SDL Timers subsystem
|
|
SDL_VIDEO_DESC= Eanble the SDL Video subsystem
|
|
VIDEO_OPENGL_DESC= OpenGL rendering support
|
|
VIDEO_X11_DESC= X11 rendering support
|
|
|
|
ASM_CONFIGURE_ENABLE= assembly
|
|
DLOPEN_CONFIGURE_ENABLE= sdl-dlopen
|
|
PTHREADS_CONFIGURE_ENABLE= pthreads pthreads-sem
|
|
SDL_ATOMIC_CONFIGURE_ENABLE= atomic gcc-atomics
|
|
SDL_AUDIO_CONFIGURE_ENABLE= audio
|
|
SDL_CPUINFO_CONFIGURE_ENABLE= cpuinfo
|
|
SDL_EVENTS_CONFIGURE_ENABLE= events
|
|
SDL_FILE_CONFIGURE_ENABLE= filesystem
|
|
SDL_HAPTIC_CONFIGURE_ENABLE= haptic
|
|
SDL_JOYSTICK_CONFIGURE_ENABLE= joystick
|
|
SDL_LOADSO_CONFIGURE_ENABLE= loadso
|
|
SDL_POWER_CONFIGURE_ENABLE= power
|
|
SDL_RENDER_CONFIGURE_ENABLE= render
|
|
SDL_THREADS_CONFIGURE_ENABLE= threads
|
|
SDL_TIMERS_CONFIGURE_ENABLE= timers
|
|
SDL_VIDEO_CONFIGURE_EANBLE= video
|
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
.if ${PORT_OPTIONS:MALSA}
|
|
.if !${PORT_OPTIONS:MSDL_AUDIO}
|
|
IGNORE= option ALSA requires SDL_AUDIO
|
|
.endif
|
|
CONFIGURE_ARGS+= --enable-alsa --enable-alsa-shared
|
|
LIB_DEPENDS+= libasound.so:${PORTSDIR}/audio/alsa-lib
|
|
.else
|
|
CONFIGURE_ARGS+= --disable-alsa --disable-alsa-shared
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MESOUND}
|
|
.if !${PORT_OPTIONS:MSDL_AUDIO}
|
|
IGNORE= option ESOUND requires SDL_AUDIO
|
|
.endif
|
|
CONFIGURE_ARGS+= --enable-esd --enable-esd-shared
|
|
USE_GNOME+= esound
|
|
.else
|
|
CONFIGURE_ARGS+= --disable-esd --disable-esd-shared
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MNAS}
|
|
.if !${PORT_OPTIONS:MSDL_AUDIO}
|
|
IGNORE= option NAS requires SDL_AUDIO
|
|
.endif
|
|
CONFIGURE_ARGS+= --enable-nas --enable-nas-shared
|
|
LIB_DEPENDS+= libaudio.so:${PORTSDIR}/audio/nas
|
|
.else
|
|
CONFIGURE_ARGS+= --disable-nas --disable-nas-shared
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MOSS}
|
|
.if !${PORT_OPTIONS:MSDL_AUDIO}
|
|
IGNORE= option OSS requires SDL_AUDIO
|
|
.endif
|
|
CONFIGURE_ARGS+= --enable-oss
|
|
.else
|
|
CONFIGURE_ARGS+= --disable-oss
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MPULSEAUDIO}
|
|
.if !${PORT_OPTIONS:MSDL_AUDIO}
|
|
IGNORE= option PULSEAUDIO requires SDL_AUDIO
|
|
.endif
|
|
CONFIGURE_ARGS+= --enable-pulseaudio --enable-pulseaudio-shared
|
|
.else
|
|
CONFIGURE_ARGS+= --disable-pulseaudio --disable-pulseaudio-shared
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MVIDEO_OPENGL}
|
|
.if !${PORT_OPTIONS:MSDL_VIDEO}
|
|
IGNORE= option VIDEO_OPENGL requires SDL_VIDEO
|
|
.endif
|
|
CONFIGURE_ARGS+= --enable-video-opengl
|
|
USE_GL= gl
|
|
.else
|
|
CONFIGURE_ARGS+= --disable-video-opengl
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MVIDEO_X11}
|
|
.if !${PORT_OPTIONS:MSDL_VIDEO}
|
|
IGNORE= option VIDEO_X11 requires SDL_VIDEO
|
|
.endif
|
|
CONFIGURE_ARGS+= --enable-video-x11 \
|
|
--enable-x11-shared \
|
|
--enable-video-x11-xcursor \
|
|
--enable-video-x11-xinerama \
|
|
--enable-video-x11-xinput \
|
|
--enable-video-x11-xrandr \
|
|
--enable-video-x11-scrnsaver \
|
|
--enable-video-x11-xshape \
|
|
--enable-video-x11-vm
|
|
USE_XORG+= xinerama xcursor xi xrandr xscrnsaver xxf86vm xext
|
|
.else
|
|
CONFIGURE_ARGS+= --disable-video-x11 \
|
|
--disable-x11-shared \
|
|
--disable-video-x11-xcursor \
|
|
--disable-video-x11-xinerama \
|
|
--disable-video-x11-xinput \
|
|
--disable-video-x11-xrandr \
|
|
--disable-video-x11-scrnsaver \
|
|
--disable-video-x11-xshape \
|
|
--disable-video-x11-vm
|
|
.endif
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
.if !empty(ICONV_LIB)
|
|
CONFIGURE_ARGS+= ac_cv_lib_iconv_iconv_open=yes ac_cv_func_iconv=yes
|
|
.endif
|
|
|
|
post-patch:
|
|
@${REINPLACE_CMD} -e '/ CheckInputEvents$$/d' \
|
|
-e 's/-liconv/${ICONV_LIB}/g' ${WRKSRC}/configure
|
|
# Clang does not provide _m_prefetch
|
|
@${REINPLACE_CMD} 's/_m_prefetch/__builtin_prefetch/' \
|
|
${WRKSRC}/configure ${WRKSRC}/src/video/SDL_blit_A.c
|
|
|
|
.include <bsd.port.post.mk>
|