Lines 1-8
Link Here
|
1 |
PORTNAME= sdl2 |
1 |
PORTNAME= sdl2 |
2 |
DISTVERSION= 2.30.2 |
2 |
DISTVERSION= 2.30.2 |
|
|
3 |
PORTREVISION= 1 |
3 |
CATEGORIES= devel |
4 |
CATEGORIES= devel |
4 |
MASTER_SITES= https://www.libsdl.org/release/ |
5 |
MASTER_SITES= https://github.com/libsdl-org/SDL/releases/download/release-${DISTVERSION}/ \ |
5 |
DISTNAME= SDL2-${PORTVERSION} |
6 |
https://www.libsdl.org/release/ |
|
|
7 |
DISTNAME= ${PORTNAME:tu}-${DISTVERSION} |
6 |
|
8 |
|
7 |
MAINTAINER= amdmi3@FreeBSD.org |
9 |
MAINTAINER= amdmi3@FreeBSD.org |
8 |
COMMENT= Cross-platform multimedia development API |
10 |
COMMENT= Cross-platform multimedia development API |
Lines 12-177
WWW= https://www.libsdl.org/ \
Link Here
|
12 |
LICENSE= ZLIB |
14 |
LICENSE= ZLIB |
13 |
LICENSE_FILE= ${WRKSRC}/LICENSE.txt |
15 |
LICENSE_FILE= ${WRKSRC}/LICENSE.txt |
14 |
|
16 |
|
15 |
GNU_CONFIGURE= yes |
17 |
BUILD_DEPENDS= ${BUILD_DEPENDS_${ARCH}} |
16 |
USES= gmake iconv libtool localbase:ldflags pathfix pkgconfig |
18 |
BUILD_DEPENDS_armv6= as:devel/binutils |
17 |
USE_CSTD= c99 |
19 |
BUILD_DEPENDS_armv7= as:devel/binutils |
|
|
20 |
|
21 |
USES= cmake iconv pkgconfig |
18 |
USE_LDCONFIG= yes |
22 |
USE_LDCONFIG= yes |
19 |
|
23 |
|
20 |
CONFIGURE_ARGS= --disable-arts \ |
24 |
CFLAGS_armv6= -B${LOCALBASE}/bin -no-integrated-as |
21 |
--disable-esd \ |
25 |
CFLAGS_armv7= -B${LOCALBASE}/bin -no-integrated-as |
22 |
--disable-rpath |
|
|
23 |
.if defined(MACHINE_CPU) && ${MACHINE_CPU:Mmmx} |
24 |
CONFIGURE_ARGS+= --enable-mmx |
25 |
.else |
26 |
CONFIGURE_ARGS+= --disable-mmx |
27 |
.endif |
28 |
.if defined(MACHINE_CPU) && ${MACHINE_CPU:M3dnow} |
29 |
CONFIGURE_ARGS+= --enable-3dnow |
30 |
.else |
31 |
CONFIGURE_ARGS+= --disable-3dnow |
32 |
.endif |
33 |
.if defined(MACHINE_CPU) && ${MACHINE_CPU:Msse} |
34 |
CONFIGURE_ARGS+= --enable-sse |
35 |
.else |
36 |
CONFIGURE_ARGS+= --disable-sse |
37 |
.endif |
38 |
.if defined(MACHINE_CPU) && ${MACHINE_CPU:Msse2} |
39 |
CONFIGURE_ARGS+= --enable-sse2 |
40 |
.else |
41 |
CONFIGURE_ARGS+= --disable-sse2 |
42 |
.endif |
43 |
.if defined(MACHINE_CPU) && ${MACHINE_CPU:Msse3} |
44 |
CONFIGURE_ARGS+= --enable-sse3 |
45 |
.else |
46 |
CONFIGURE_ARGS+= --disable-sse3 |
47 |
.endif |
48 |
|
49 |
MAKE_ENV= V=1 |
50 |
|
26 |
|
51 |
PORTSCOUT= limitw:1,even |
27 |
PORTSCOUT= limitw:1,even |
52 |
|
28 |
|
53 |
OPTIONS_DEFINE= ASM CSD DBUS FCITX IBUS JOYSTICK HIDAPI PTHREADS \ |
29 |
CMAKE_OFF= SDL_ARTS SDL_ARTS_SHARED \ |
|
|
30 |
SDL_ESD \ |
31 |
SDL_LIBICONV \ |
32 |
SDL_NAS SDL_NAS_SHARED \ |
33 |
SDL_RPATH |
34 |
CMAKE_ON= CMAKE_DISABLE_FIND_PACKAGE_Git \ |
35 |
SDL_ASSEMBLY \ |
36 |
SDL_SYSTEM_ICONV \ |
37 |
SDL_PTHREADS SDL_PTHREADS_SEM |
38 |
|
39 |
OPTIONS_DEFINE= ALTIVEC CSD DBUS FCITX IBUS JOYSTICK HIDAPI \ |
54 |
SAMPLERATE UDEV |
40 |
SAMPLERATE UDEV |
55 |
OPTIONS_GROUP= AUDIO VIDEO |
41 |
OPTIONS_GROUP= AUDIO VIDEO |
56 |
OPTIONS_GROUP_AUDIO= ALSA JACK NAS OSS PIPEWIRE PULSEAUDIO SNDIO |
42 |
OPTIONS_GROUP_AUDIO= ALSA JACK OSS PIPEWIRE PULSEAUDIO SNDIO |
57 |
OPTIONS_GROUP_VIDEO= KMSDRM OPENGL OPENGLES1 OPENGLES2 VULKAN \ |
43 |
OPTIONS_GROUP_VIDEO= KMSDRM OPENGL OPENGLES VULKAN \ |
58 |
WAYLAND X11 |
44 |
WAYLAND X11 |
59 |
OPTIONS_DEFAULT= ASM JOYSTICK OSS PTHREADS KMSDRM OPENGL \ |
45 |
OPTIONS_DEFAULT= JOYSTICK OSS PTHREADS KMSDRM OPENGL \ |
60 |
OPENGLES1 OPENGLES2 VULKAN WAYLAND X11 |
46 |
OPENGLES VULKAN WAYLAND X11 |
61 |
OPTIONS_DEFINE_powerpc= ALTIVEC |
47 |
OPTIONS_EXCLUDE_amd64= ALTIVEC |
62 |
OPTIONS_DEFINE_powerpc64= ALTIVEC |
48 |
OPTIONS_EXCLUDE_aarch64=ALTIVEC |
63 |
OPTIONS_DEFAULT_powerpc= ALTIVEC |
49 |
OPTIONS_EXCLUDE_armv6= ALTIVEC |
64 |
OPTIONS_DEFAULT_powerpc64= ALTIVEC |
50 |
OPTIONS_EXCLUDE_armv7= ALTIVEC |
|
|
51 |
OPTIONS_EXCLUDE_i386= ALTIVEC |
52 |
OPTIONS_EXCLUDE_riscv= ALTIVEC |
65 |
|
53 |
|
66 |
AUDIO_DESC= Audio drivers |
54 |
AUDIO_DESC= Audio drivers |
67 |
VIDEO_DESC= Video drivers |
55 |
VIDEO_DESC= Video drivers |
68 |
|
56 |
|
69 |
CSD_DESC= Client-side decorations for Wayland via libdecor |
57 |
CSD_DESC= Client-side decorations for Wayland via libdecor |
70 |
JOYSTICK_DESC= Joystick and haptic support |
58 |
FCITX_DESC= fcitx support |
71 |
HIDAPI_DESC= Use HIDAPI for low level joystick drivers |
59 |
HIDAPI_DESC= Use HIDAPI for low level joystick drivers |
72 |
PTHREADS_DESC= Use POSIX threads for multi-threading |
60 |
IBUS_DESC= IBus support |
73 |
UDEV_DESC= Use udev for input device detection |
61 |
JOYSTICK_DESC= Joystick and haptic support |
74 |
KMSDRM_DESC= KMSDRM display support |
62 |
KMSDRM_DESC= KMSDRM display support |
75 |
OPENGL_DESC= OpenGL rendering support |
63 |
OPENGLES_DESC= OpenGL ES rendering support |
76 |
OPENGLES1_DESC= OpenGL ES 1.x rendering support |
64 |
UDEV_DESC= Use udev for input device detection |
77 |
OPENGLES2_DESC= OpenGL ES 2.x rendering support |
|
|
78 |
VULKAN_DESC= Vulkan rendering support |
65 |
VULKAN_DESC= Vulkan rendering support |
79 |
WAYLAND_DESC= Wayland display support |
|
|
80 |
X11_DESC= X11 display support |
81 |
IBUS_DESC= IBus support |
82 |
FCITX_DESC= fcitx support |
83 |
|
66 |
|
84 |
ALTIVEC_CONFIGURE_ENABLE= altivec |
67 |
ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib |
85 |
ALSA_CONFIGURE_ENABLE= alsa alsa-shared |
68 |
ALSA_CMAKE_BOOL= SDL_ALSA SDL_ALSA_SHARED |
86 |
ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib |
69 |
ALSA_CMAKE_BOOL_OFF= CMAKE_DISABLE_FIND_PACKAGE_ALSA |
87 |
ASM_CONFIGURE_ENABLE= assembly |
70 |
|
88 |
CSD_CONFIGURE_ENABLE= libdecor libdecor-shared |
71 |
ALTIVEC_CMAKE_BOOL= SDL_ALTIVEC |
89 |
CSD_LIB_DEPENDS= libdecor-0.so:x11-toolkits/libdecor |
72 |
|
90 |
CSD_IMPLIES= WAYLAND |
73 |
CSD_LIB_DEPENDS= libdecor-0.so:x11-toolkits/libdecor |
91 |
HIDAPI_CONFIGURE_ENABLE= hidapi |
74 |
CSD_CMAKE_BOOL= SDL_WAYLAND_LIBDECOR SDL_WAYLAND_LIBDECOR_SHARED |
92 |
HIDAPI_IMPLIES= JOYSTICK |
75 |
CSD_IMPLIES= WAYLAND |
93 |
JACK_CONFIGURE_ENABLE= jack jack-shared |
76 |
|
94 |
JACK_LIB_DEPENDS= libjack.so:audio/jack |
77 |
DBUS_LIB_DEPENDS= libdbus-1.so:devel/dbus |
95 |
JOYSTICK_CONFIGURE_ENABLE= joystick haptic |
78 |
DBUS_CMAKE_BOOL= SDL_DBUS |
96 |
JOYSTICK_BUILD_DEPENDS= ${LOCALBASE}/include/linux/input.h:devel/evdev-proto |
79 |
|
97 |
JOYSTICK_LIB_DEPENDS= libinotify.so:devel/libinotify |
80 |
FCITX_LIB_DEPENDS= libfcitx-config.so:chinese/fcitx |
98 |
NAS_CONFIGURE_ENABLE= nas nas-shared |
81 |
FCITX_IMPLIES= DBUS |
99 |
NAS_LIB_DEPENDS= libaudio.so:audio/nas |
82 |
|
100 |
OSS_CONFIGURE_ENABLE= oss |
83 |
HIDAPI_CMAKE_BOOL= SDL_HIDAPI |
101 |
PIPEWIRE_CONFIGURE_ENABLE= pipewire pipewire-shared |
84 |
HIDAPI_IMPLIES= JOYSTICK |
102 |
PIPEWIRE_LIB_DEPENDS= libpipewire-0.3.so:multimedia/pipewire |
85 |
|
103 |
PTHREADS_CONFIGURE_ENABLE= pthreads pthread-sem |
86 |
IBUS_LIB_DEPENDS= libibus-1.0.so:textproc/ibus |
104 |
PULSEAUDIO_CONFIGURE_ENABLE= pulseaudio pulseaudio-shared |
87 |
IBUS_CMAKE_BOOL= SDL_IBUS |
105 |
PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio |
88 |
IBUS_IMPLIES= DBUS |
106 |
SAMPLERATE_CONFIGURE_ENABLE= libsamplerate libsamplerate-shared |
89 |
|
107 |
SAMPLERATE_LIB_DEPENDS= libsamplerate.so:audio/libsamplerate |
90 |
JACK_LIB_DEPENDS= libjack.so:audio/jack |
108 |
SNDIO_CONFIGURE_ENABLE= sndio sndio-shared |
91 |
JACK_CMAKE_BOOL= SDL_JACK SDL_JACK_SHARED |
109 |
SNDIO_LIB_DEPENDS= libsndio.so:audio/sndio |
92 |
|
110 |
UDEV_CONFIGURE_ENABLE= libudev |
93 |
JOYSTICK_BUILD_DEPENDS= ${LOCALBASE}/include/linux/input.h:devel/evdev-proto |
111 |
UDEV_LIB_DEPENDS= libudev.so:devel/libudev-devd |
94 |
JOYSTICK_LIB_DEPENDS= libinotify.so:devel/libinotify |
112 |
UDEV_BUILD_DEPENDS= ${LOCALBASE}/include/linux/input.h:devel/evdev-proto |
95 |
JOYSTICK_CMAKE_BOOL= SDL_HIDAPI_JOYSTICK SDL_HIDAPI_LIBUSB SDL_VIRTUAL_JOYSTICK |
113 |
KMSDRM_CONFIGURE_ENABLE= video-kmsdrm kmsdrm-shared |
96 |
|
114 |
KMSDRM_USES= gl |
97 |
KMSDRM_USES= gl |
115 |
KMSDRM_USE= GL=gbm |
98 |
KMSDRM_USE= GL=gbm |
116 |
OPENGL_CONFIGURE_ENABLE= video-opengl |
99 |
KMSDRM_CMAKE_BOOL= SDL_KMSDRM SDL_KMSDRM_SHARED |
117 |
OPENGL_USES= gl |
100 |
|
118 |
OPENGL_USE= GL=opengl |
101 |
OPENGL_USES= gl |
119 |
OPENGLES1_CONFIGURE_ENABLE= video-opengles1 |
102 |
OPENGL_USE= GL=opengl |
120 |
OPENGLES1_USES= gl |
103 |
OPENGL_CMAKE_BOOL= SDL_OPENGL |
121 |
OPENGLES1_USE= GL=egl,glesv1 |
104 |
|
122 |
OPENGLES1_IMPLIES= OPENGLES |
105 |
OPENGLES_USES= gl |
123 |
OPENGLES2_CONFIGURE_ENABLE= video-opengles2 |
106 |
OPENGLES_USE= GL=egl,glesv1,glesv2 |
124 |
OPENGLES2_USES= gl |
107 |
OPENGLES_CMAKE_BOOL= SDL_OPENGLES |
125 |
OPENGLES2_USE= GL=egl,glesv2 |
108 |
|
126 |
OPENGLES2_IMPLIES= OPENGLES |
109 |
OSS_CMAKE_BOOL= SDL_OSS |
127 |
VULKAN_CONFIGURE_ENABLE= video-vulkan |
110 |
|
128 |
VULKAN_LIB_DEPENDS= libvulkan.so:graphics/vulkan-loader |
111 |
PIPEWIRE_LIB_DEPENDS= libpipewire-0.3.so:multimedia/pipewire |
129 |
WAYLAND_CONFIGURE_ENABLE= video-wayland wayland-shared video-wayland-qt-touch |
112 |
PIPEWIRE_CMAKE_BOOL= SDL_PIPEWIRE SDL_PIPEWIRE_SHARED |
130 |
WAYLAND_BUILD_DEPENDS= wayland-protocols>0:graphics/wayland-protocols \ |
113 |
|
131 |
${LOCALBASE}/include/linux/input.h:devel/evdev-proto |
114 |
PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio |
132 |
WAYLAND_LIB_DEPENDS= libwayland-egl.so:graphics/wayland \ |
115 |
PULSEAUDIO_CMAKE_BOOL= SDL_PULSEAUDIO SDL_PULSEAUDIO_SHARED |
133 |
libxkbcommon.so:x11/libxkbcommon |
116 |
|
134 |
WAYLAND_IMPLIES= OPENGLES2 |
117 |
SAMPLERATE_LIB_DEPENDS= libsamplerate.so:audio/libsamplerate |
135 |
X11_CONFIGURE_ENABLE= video-x11 x11-shared \ |
118 |
SAMPLERATE_CMAKE_BOOL= SDL_LIBSAMPLERATE SDL_LIBSAMPLERATE_SHARED |
136 |
video-x11-xcursor \ |
119 |
SAMPLERATE_BOOL_OFF= CMAKE_DISABLE_FIND_PACKAGE_SampleRate |
137 |
video-x11-xdbe \ |
120 |
|
138 |
video-x11-xinput \ |
121 |
SNDIO_LIB_DEPENDS= libsndio.so:audio/sndio |
139 |
video-x11-xfixes \ |
122 |
SNDIO_CMAKE_BOOL= SDL_SNDIO SDL_SNDIO_SHARED |
140 |
video-x11-xrandr \ |
123 |
|
141 |
video-x11-scrnsaver \ |
124 |
UDEV_BUILD_DEPENDS= ${LOCALBASE}/include/linux/input.h:devel/evdev-proto |
142 |
video-x11-xshape |
125 |
UDEV_LIB_DEPENDS= libudev.so:devel/libudev-devd |
143 |
X11_USES= xorg |
126 |
UDEV_CMAKE_BOOL= SDL_LIBUDEV |
144 |
X11_USE= XORG=xcursor,xext,xi,xfixes,xrandr,xscrnsaver |
127 |
|
145 |
DBUS_LIB_DEPENDS= libdbus-1.so:devel/dbus |
128 |
VULKAN_LIB_DEPENDS= libvulkan.so:graphics/vulkan-loader |
146 |
DBUS_CONFIGURE_ENABLE= dbus |
129 |
VULKAN_CMAKE_BOOL= SDL_VULKAN |
147 |
FCITX_LIB_DEPENDS= libfcitx-config.so:chinese/fcitx |
130 |
|
148 |
FCITX_CONFIGURE_ENABLE= fcitx |
131 |
WAYLAND_BUILD_DEPENDS= wayland-protocols>0:graphics/wayland-protocols \ |
149 |
FCITX_IMPLIES= DBUS |
132 |
${LOCALBASE}/include/linux/input.h:devel/evdev-proto |
150 |
IBUS_LIB_DEPENDS= libibus-1.0.so:textproc/ibus |
133 |
WAYLAND_LIB_DEPENDS= libwayland-egl.so:graphics/wayland \ |
151 |
IBUS_CONFIGURE_ENABLE= ibus |
134 |
libxkbcommon.so:x11/libxkbcommon |
152 |
IBUS_IMPLIES= DBUS |
135 |
WAYLAND_CMAKE_BOOL= SDL_WAYLAND SDL_WAYLAND_SHARED |
153 |
|
136 |
WAYLAND_IMPLIES= SDL_OPENGLES |
154 |
.include <bsd.port.options.mk> |
137 |
|
155 |
|
138 |
X11_USES= xorg |
156 |
# Similar to x11/pixman |
139 |
X11_USE= XORG=xcursor,xext,xi,xfixes,xrandr,xscrnsaver |
157 |
.if ${ARCH} == "armv6" || ${ARCH} == "armv7" |
140 |
X11_CMAKE_BOOL= SDL_X11 SDL_X11_SHARED |
158 |
BUILD_DEPENDS+= ${LOCALBASE}/bin/as:devel/binutils |
141 |
|
159 |
CFLAGS+= -B${LOCALBASE}/bin -no-integrated-as |
142 |
post-patch-FCITX-off: |
160 |
.endif |
143 |
@${REINPLACE_CMD} -e 's|HAVE_FCITX TRUE|HAVE_FCITX FALSE|g' \ |
161 |
|
144 |
${PATCH_WRKSRC}/CMakeLists.txt |
162 |
.include <bsd.port.pre.mk> |
145 |
|
163 |
|
146 |
.include <bsd.port.mk> |
164 |
.if !empty(ICONV_LIB) |
|
|
165 |
CONFIGURE_ARGS+= ac_cv_lib_iconv_iconv_open=yes ac_cv_func_iconv=yes |
166 |
.endif |
167 |
|
168 |
post-patch: |
169 |
@${REINPLACE_CMD} -e 's/-liconv/${ICONV_LIB}/g' ${WRKSRC}/configure |
170 |
# Clang does not provide _m_prefetch |
171 |
@${REINPLACE_CMD} 's/_m_prefetch/__builtin_prefetch/' \ |
172 |
${WRKSRC}/configure ${WRKSRC}/src/video/SDL_blit_A.c |
173 |
|
174 |
post-install: |
175 |
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libSDL2.so |
176 |
|
177 |
.include <bsd.port.post.mk> |