FreeBSD Bugzilla – Attachment 249962 Details for
Bug 278353
devel/sdl20: Convert to CMake
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for sdl20
sdl20-cmake-ified-v2.patch (text/plain), 13.84 KB, created by
Daniel Engberg
on 2024-04-14 10:27:42 UTC
(
hide
)
Description:
Patch for sdl20
Filename:
MIME Type:
Creator:
Daniel Engberg
Created:
2024-04-14 10:27:42 UTC
Size:
13.84 KB
patch
obsolete
>diff --git a/devel/sdl20/Makefile b/devel/sdl20/Makefile >index 63236ad63e10..61da79ba9695 100644 >--- a/devel/sdl20/Makefile >+++ b/devel/sdl20/Makefile >@@ -1,8 +1,10 @@ > PORTNAME= sdl2 > DISTVERSION= 2.30.2 >+PORTREVISION= 1 > CATEGORIES= devel >-MASTER_SITES= https://www.libsdl.org/release/ >-DISTNAME= SDL2-${PORTVERSION} >+MASTER_SITES= https://github.com/libsdl-org/SDL/releases/download/release-${DISTVERSION}/ \ >+ https://www.libsdl.org/release/ >+DISTNAME= ${PORTNAME:tu}-${DISTVERSION} > > MAINTAINER= amdmi3@FreeBSD.org > COMMENT= Cross-platform multimedia development API >@@ -12,166 +14,133 @@ WWW= https://www.libsdl.org/ \ > LICENSE= ZLIB > LICENSE_FILE= ${WRKSRC}/LICENSE.txt > >-GNU_CONFIGURE= yes >-USES= gmake iconv libtool localbase:ldflags pathfix pkgconfig >-USE_CSTD= c99 >+BUILD_DEPENDS= ${BUILD_DEPENDS_${ARCH}} >+BUILD_DEPENDS_armv6= as:devel/binutils >+BUILD_DEPENDS_armv7= as:devel/binutils >+ >+USES= cmake iconv pkgconfig > USE_LDCONFIG= yes > >-CONFIGURE_ARGS= --disable-arts \ >- --disable-esd \ >- --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 >-.if defined(MACHINE_CPU) && ${MACHINE_CPU:Msse3} >-CONFIGURE_ARGS+= --enable-sse3 >-.else >-CONFIGURE_ARGS+= --disable-sse3 >-.endif >- >-MAKE_ENV= V=1 >+CFLAGS_armv6= -B${LOCALBASE}/bin -no-integrated-as >+CFLAGS_armv7= -B${LOCALBASE}/bin -no-integrated-as > > PORTSCOUT= limitw:1,even > >-OPTIONS_DEFINE= ASM CSD DBUS FCITX IBUS JOYSTICK HIDAPI PTHREADS \ >+CMAKE_OFF= SDL_ARTS SDL_ARTS_SHARED \ >+ SDL_ESD \ >+ SDL_LIBICONV \ >+ SDL_NAS SDL_NAS_SHARED \ >+ SDL_RPATH >+CMAKE_ON= CMAKE_DISABLE_FIND_PACKAGE_Git \ >+ SDL_ASSEMBLY \ >+ SDL_SYSTEM_ICONV \ >+ SDL_PTHREADS SDL_PTHREADS_SEM >+ >+OPTIONS_DEFINE= ALTIVEC CSD DBUS FCITX IBUS JOYSTICK HIDAPI \ > SAMPLERATE UDEV > OPTIONS_GROUP= AUDIO VIDEO >-OPTIONS_GROUP_AUDIO= ALSA JACK NAS OSS PIPEWIRE PULSEAUDIO SNDIO >-OPTIONS_GROUP_VIDEO= KMSDRM OPENGL OPENGLES1 OPENGLES2 VULKAN \ >+OPTIONS_GROUP_AUDIO= ALSA JACK OSS PIPEWIRE PULSEAUDIO SNDIO >+OPTIONS_GROUP_VIDEO= KMSDRM OPENGL OPENGLES VULKAN \ > WAYLAND X11 >-OPTIONS_DEFAULT= ASM JOYSTICK OSS PTHREADS KMSDRM OPENGL \ >- OPENGLES1 OPENGLES2 VULKAN WAYLAND X11 >-OPTIONS_DEFINE_powerpc= ALTIVEC >-OPTIONS_DEFINE_powerpc64= ALTIVEC >-OPTIONS_DEFAULT_powerpc= ALTIVEC >-OPTIONS_DEFAULT_powerpc64= ALTIVEC >+OPTIONS_DEFAULT= JOYSTICK OSS PTHREADS KMSDRM OPENGL \ >+ OPENGLES VULKAN WAYLAND X11 >+OPTIONS_EXCLUDE_amd64= ALTIVEC >+OPTIONS_EXCLUDE_aarch64=ALTIVEC >+OPTIONS_EXCLUDE_armv6= ALTIVEC >+OPTIONS_EXCLUDE_armv7= ALTIVEC >+OPTIONS_EXCLUDE_i386= ALTIVEC >+OPTIONS_EXCLUDE_riscv= ALTIVEC > > AUDIO_DESC= Audio drivers > VIDEO_DESC= Video drivers > > CSD_DESC= Client-side decorations for Wayland via libdecor >-JOYSTICK_DESC= Joystick and haptic support >+FCITX_DESC= fcitx support > HIDAPI_DESC= Use HIDAPI for low level joystick drivers >-PTHREADS_DESC= Use POSIX threads for multi-threading >-UDEV_DESC= Use udev for input device detection >+IBUS_DESC= IBus support >+JOYSTICK_DESC= Joystick and haptic support > KMSDRM_DESC= KMSDRM display support >-OPENGL_DESC= OpenGL rendering support >-OPENGLES1_DESC= OpenGL ES 1.x rendering support >-OPENGLES2_DESC= OpenGL ES 2.x rendering support >+OPENGLES_DESC= OpenGL ES rendering support >+UDEV_DESC= Use udev for input device detection > VULKAN_DESC= Vulkan rendering support >-WAYLAND_DESC= Wayland display support >-X11_DESC= X11 display support >-IBUS_DESC= IBus support >-FCITX_DESC= fcitx support > >-ALTIVEC_CONFIGURE_ENABLE= altivec >-ALSA_CONFIGURE_ENABLE= alsa alsa-shared >-ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib >-ASM_CONFIGURE_ENABLE= assembly >-CSD_CONFIGURE_ENABLE= libdecor libdecor-shared >-CSD_LIB_DEPENDS= libdecor-0.so:x11-toolkits/libdecor >-CSD_IMPLIES= WAYLAND >-HIDAPI_CONFIGURE_ENABLE= hidapi >-HIDAPI_IMPLIES= JOYSTICK >-JACK_CONFIGURE_ENABLE= jack jack-shared >-JACK_LIB_DEPENDS= libjack.so:audio/jack >-JOYSTICK_CONFIGURE_ENABLE= joystick haptic >-JOYSTICK_BUILD_DEPENDS= ${LOCALBASE}/include/linux/input.h:devel/evdev-proto >-JOYSTICK_LIB_DEPENDS= libinotify.so:devel/libinotify >-NAS_CONFIGURE_ENABLE= nas nas-shared >-NAS_LIB_DEPENDS= libaudio.so:audio/nas >-OSS_CONFIGURE_ENABLE= oss >-PIPEWIRE_CONFIGURE_ENABLE= pipewire pipewire-shared >-PIPEWIRE_LIB_DEPENDS= libpipewire-0.3.so:multimedia/pipewire >-PTHREADS_CONFIGURE_ENABLE= pthreads pthread-sem >-PULSEAUDIO_CONFIGURE_ENABLE= pulseaudio pulseaudio-shared >-PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio >-SAMPLERATE_CONFIGURE_ENABLE= libsamplerate libsamplerate-shared >-SAMPLERATE_LIB_DEPENDS= libsamplerate.so:audio/libsamplerate >-SNDIO_CONFIGURE_ENABLE= sndio sndio-shared >-SNDIO_LIB_DEPENDS= libsndio.so:audio/sndio >-UDEV_CONFIGURE_ENABLE= libudev >-UDEV_LIB_DEPENDS= libudev.so:devel/libudev-devd >-UDEV_BUILD_DEPENDS= ${LOCALBASE}/include/linux/input.h:devel/evdev-proto >-KMSDRM_CONFIGURE_ENABLE= video-kmsdrm kmsdrm-shared >-KMSDRM_USES= gl >-KMSDRM_USE= GL=gbm >-OPENGL_CONFIGURE_ENABLE= video-opengl >-OPENGL_USES= gl >-OPENGL_USE= GL=opengl >-OPENGLES1_CONFIGURE_ENABLE= video-opengles1 >-OPENGLES1_USES= gl >-OPENGLES1_USE= GL=egl,glesv1 >-OPENGLES1_IMPLIES= OPENGLES >-OPENGLES2_CONFIGURE_ENABLE= video-opengles2 >-OPENGLES2_USES= gl >-OPENGLES2_USE= GL=egl,glesv2 >-OPENGLES2_IMPLIES= OPENGLES >-VULKAN_CONFIGURE_ENABLE= video-vulkan >-VULKAN_LIB_DEPENDS= libvulkan.so:graphics/vulkan-loader >-WAYLAND_CONFIGURE_ENABLE= video-wayland wayland-shared video-wayland-qt-touch >-WAYLAND_BUILD_DEPENDS= wayland-protocols>0:graphics/wayland-protocols \ >- ${LOCALBASE}/include/linux/input.h:devel/evdev-proto >-WAYLAND_LIB_DEPENDS= libwayland-egl.so:graphics/wayland \ >- libxkbcommon.so:x11/libxkbcommon >-WAYLAND_IMPLIES= OPENGLES2 >-X11_CONFIGURE_ENABLE= video-x11 x11-shared \ >- video-x11-xcursor \ >- video-x11-xdbe \ >- video-x11-xinput \ >- video-x11-xfixes \ >- video-x11-xrandr \ >- video-x11-scrnsaver \ >- video-x11-xshape >-X11_USES= xorg >-X11_USE= XORG=xcursor,xext,xi,xfixes,xrandr,xscrnsaver >-DBUS_LIB_DEPENDS= libdbus-1.so:devel/dbus >-DBUS_CONFIGURE_ENABLE= dbus >-FCITX_LIB_DEPENDS= libfcitx-config.so:chinese/fcitx >-FCITX_CONFIGURE_ENABLE= fcitx >-FCITX_IMPLIES= DBUS >-IBUS_LIB_DEPENDS= libibus-1.0.so:textproc/ibus >-IBUS_CONFIGURE_ENABLE= ibus >-IBUS_IMPLIES= DBUS >- >-.include <bsd.port.options.mk> >- >-# Similar to x11/pixman >-.if ${ARCH} == "armv6" || ${ARCH} == "armv7" >-BUILD_DEPENDS+= ${LOCALBASE}/bin/as:devel/binutils >-CFLAGS+= -B${LOCALBASE}/bin -no-integrated-as >-.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 '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 >- >-post-install: >- @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libSDL2.so >- >-.include <bsd.port.post.mk> >+ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib >+ALSA_CMAKE_BOOL= SDL_ALSA SDL_ALSA_SHARED >+ALSA_CMAKE_BOOL_OFF= CMAKE_DISABLE_FIND_PACKAGE_ALSA >+ >+ALTIVEC_CMAKE_BOOL= SDL_ALTIVEC >+ >+CSD_LIB_DEPENDS= libdecor-0.so:x11-toolkits/libdecor >+CSD_CMAKE_BOOL= SDL_WAYLAND_LIBDECOR SDL_WAYLAND_LIBDECOR_SHARED >+CSD_IMPLIES= WAYLAND >+ >+DBUS_LIB_DEPENDS= libdbus-1.so:devel/dbus >+DBUS_CMAKE_BOOL= SDL_DBUS >+ >+FCITX_LIB_DEPENDS= libfcitx-config.so:chinese/fcitx >+FCITX_IMPLIES= DBUS >+ >+HIDAPI_CMAKE_BOOL= SDL_HIDAPI >+HIDAPI_IMPLIES= JOYSTICK >+ >+IBUS_LIB_DEPENDS= libibus-1.0.so:textproc/ibus >+IBUS_CMAKE_BOOL= SDL_IBUS >+IBUS_IMPLIES= DBUS >+ >+JACK_LIB_DEPENDS= libjack.so:audio/jack >+JACK_CMAKE_BOOL= SDL_JACK SDL_JACK_SHARED >+ >+JOYSTICK_BUILD_DEPENDS= ${LOCALBASE}/include/linux/input.h:devel/evdev-proto >+JOYSTICK_LIB_DEPENDS= libinotify.so:devel/libinotify >+JOYSTICK_CMAKE_BOOL= SDL_HIDAPI_JOYSTICK SDL_HIDAPI_LIBUSB SDL_VIRTUAL_JOYSTICK >+ >+KMSDRM_USES= gl >+KMSDRM_USE= GL=gbm >+KMSDRM_CMAKE_BOOL= SDL_KMSDRM SDL_KMSDRM_SHARED >+ >+OPENGL_USES= gl >+OPENGL_USE= GL=opengl >+OPENGL_CMAKE_BOOL= SDL_OPENGL >+ >+OPENGLES_USES= gl >+OPENGLES_USE= GL=egl,glesv1,glesv2 >+OPENGLES_CMAKE_BOOL= SDL_OPENGLES >+ >+OSS_CMAKE_BOOL= SDL_OSS >+ >+PIPEWIRE_LIB_DEPENDS= libpipewire-0.3.so:multimedia/pipewire >+PIPEWIRE_CMAKE_BOOL= SDL_PIPEWIRE SDL_PIPEWIRE_SHARED >+ >+PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio >+PULSEAUDIO_CMAKE_BOOL= SDL_PULSEAUDIO SDL_PULSEAUDIO_SHARED >+ >+SAMPLERATE_LIB_DEPENDS= libsamplerate.so:audio/libsamplerate >+SAMPLERATE_CMAKE_BOOL= SDL_LIBSAMPLERATE SDL_LIBSAMPLERATE_SHARED >+SAMPLERATE_BOOL_OFF= CMAKE_DISABLE_FIND_PACKAGE_SampleRate >+ >+SNDIO_LIB_DEPENDS= libsndio.so:audio/sndio >+SNDIO_CMAKE_BOOL= SDL_SNDIO SDL_SNDIO_SHARED >+ >+UDEV_BUILD_DEPENDS= ${LOCALBASE}/include/linux/input.h:devel/evdev-proto >+UDEV_LIB_DEPENDS= libudev.so:devel/libudev-devd >+UDEV_CMAKE_BOOL= SDL_LIBUDEV >+ >+VULKAN_LIB_DEPENDS= libvulkan.so:graphics/vulkan-loader >+VULKAN_CMAKE_BOOL= SDL_VULKAN >+ >+WAYLAND_BUILD_DEPENDS= wayland-protocols>0:graphics/wayland-protocols \ >+ ${LOCALBASE}/include/linux/input.h:devel/evdev-proto >+WAYLAND_LIB_DEPENDS= libwayland-egl.so:graphics/wayland \ >+ libxkbcommon.so:x11/libxkbcommon >+WAYLAND_CMAKE_BOOL= SDL_WAYLAND SDL_WAYLAND_SHARED >+WAYLAND_IMPLIES= SDL_OPENGLES >+ >+X11_USES= xorg >+X11_USE= XORG=xcursor,xext,xi,xfixes,xrandr,xscrnsaver >+X11_CMAKE_BOOL= SDL_X11 SDL_X11_SHARED >+ >+post-patch-FCITX-off: >+ @${REINPLACE_CMD} -e 's|HAVE_FCITX TRUE|HAVE_FCITX FALSE|g' \ >+ ${PATCH_WRKSRC}/CMakeLists.txt >+ >+.include <bsd.port.mk> >diff --git a/devel/sdl20/files/patch-CMakeLists.txt b/devel/sdl20/files/patch-CMakeLists.txt >new file mode 100644 >index 000000000000..1cb81d23146e >--- /dev/null >+++ b/devel/sdl20/files/patch-CMakeLists.txt >@@ -0,0 +1,35 @@ >+--- CMakeLists.txt.orig 2024-04-01 23:57:44 UTC >++++ CMakeLists.txt >+@@ -404,12 +404,12 @@ set_option(SDL_ASSEMBLY "Enable assembly ro >+ option_string(SDL_ASSERTIONS "Enable internal sanity checks (auto/disabled/release/enabled/paranoid)" "auto") >+ #set_option(SDL_DEPENDENCY_TRACKING "Use gcc -MMD -MT dependency tracking" ON) >+ set_option(SDL_ASSEMBLY "Enable assembly routines" ${OPT_DEF_ASM}) >+-dep_option(SDL_SSEMATH "Allow GCC to use SSE floating point math" ON "SDL_ASSEMBLY;SDL_CPU_X86 OR SDL_CPU_X64" OFF) >++#[[ dep_option(SDL_SSEMATH "Allow GCC to use SSE floating point math" ON "SDL_ASSEMBLY;SDL_CPU_X86 OR SDL_CPU_X64" OFF) >+ dep_option(SDL_SSE "Use SSE assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_X86 OR SDL_CPU_X64" OFF) >+ dep_option(SDL_SSE2 "Use SSE2 assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_X86 OR SDL_CPU_X64" OFF) >+ dep_option(SDL_SSE3 "Use SSE3 assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_X86 OR SDL_CPU_X64" OFF) >+ dep_option(SDL_MMX "Use MMX assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_X86 OR SDL_CPU_X64" OFF) >+-dep_option(SDL_3DNOW "Use 3Dnow! MMX assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_X86 OR SDL_CPU_X64" OFF) >++dep_option(SDL_3DNOW "Use 3Dnow! MMX assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_X86 OR SDL_CPU_X64" OFF) ]] >+ dep_option(SDL_ALTIVEC "Use Altivec assembly routines" ON "SDL_ASSEMBLY" OFF) >+ dep_option(SDL_ARMSIMD "Use SIMD assembly blitters on ARM" OFF "SDL_ASSEMBLY;SDL_CPU_ARM32" OFF) >+ dep_option(SDL_ARMNEON "Use NEON assembly blitters on ARM" OFF "SDL_ASSEMBLY;SDL_CPU_ARM32" OFF) >+@@ -758,7 +758,7 @@ if(SDL_ASSEMBLY) >+ # TODO: Those all seem to be quite GCC specific - needs to be >+ # reworked for better compiler support >+ set(HAVE_ASSEMBLY TRUE) >+- if(SDL_MMX) >++#[[ if(SDL_MMX) >+ set(CMAKE_REQUIRED_FLAGS "-mmmx") >+ check_c_source_compiles(" >+ #ifdef __MINGW32__ >+@@ -881,7 +881,7 @@ if(SDL_ASSEMBLY) >+ endif() >+ else() >+ set(HAVE_SSEMATH TRUE) >+- endif() >++ endif() ]] >+ >+ check_include_file("immintrin.h" HAVE_IMMINTRIN_H) >+ >diff --git a/devel/sdl20/files/patch-sdl2-config.in b/devel/sdl20/files/patch-sdl2-config.in >new file mode 100644 >index 000000000000..6eca8c65c4b7 >--- /dev/null >+++ b/devel/sdl20/files/patch-sdl2-config.in >@@ -0,0 +1,11 @@ >+--- sdl2-config.in.orig 2024-04-14 09:17:31 UTC >++++ sdl2-config.in >+@@ -46,7 +46,7 @@ while test $# -gt 0; do >+ echo @SDL_VERSION@ >+ ;; >+ --cflags) >+- echo -I@includedir@/SDL2 @SDL_CFLAGS@ >++ echo -I@includedir@ -I@includedir@/SDL2 @SDL_CFLAGS@ >+ ;; >+ @ENABLE_SHARED_TRUE@ --libs) >+ @ENABLE_SHARED_TRUE@ echo -L@libdir@ @SDL_RLD_FLAGS@ @SDL_LIBS@ >diff --git a/devel/sdl20/pkg-plist b/devel/sdl20/pkg-plist >index bc0e2c59c786..3a20d202300c 100644 >--- a/devel/sdl20/pkg-plist >+++ b/devel/sdl20/pkg-plist >@@ -7,6 +7,7 @@ include/SDL2/SDL_bits.h > include/SDL2/SDL_blendmode.h > include/SDL2/SDL_clipboard.h > include/SDL2/SDL_config.h >+include/SDL2/SDL_copying.h > include/SDL2/SDL_cpuinfo.h > include/SDL2/SDL_egl.h > include/SDL2/SDL_endian.h >@@ -77,8 +78,18 @@ include/SDL2/SDL_video.h > include/SDL2/SDL_vulkan.h > include/SDL2/begin_code.h > include/SDL2/close_code.h >-lib/cmake/SDL2/sdl2-config-version.cmake >-lib/cmake/SDL2/sdl2-config.cmake >+lib/cmake/SDL2/SDL2Config.cmake >+lib/cmake/SDL2/SDL2ConfigVersion.cmake >+lib/cmake/SDL2/SDL2Targets-%%CMAKE_BUILD_TYPE%%.cmake >+lib/cmake/SDL2/SDL2Targets.cmake >+lib/cmake/SDL2/SDL2mainTargets-%%CMAKE_BUILD_TYPE%%.cmake >+lib/cmake/SDL2/SDL2mainTargets.cmake >+lib/cmake/SDL2/SDL2staticTargets-%%CMAKE_BUILD_TYPE%%.cmake >+lib/cmake/SDL2/SDL2staticTargets.cmake >+lib/cmake/SDL2/SDL2testTargets-%%CMAKE_BUILD_TYPE%%.cmake >+lib/cmake/SDL2/SDL2testTargets.cmake >+lib/cmake/SDL2/sdlfind.cmake >+lib/libSDL2-2.0.so > lib/libSDL2-2.0.so.0 > lib/libSDL2-2.0.so.0.3000.2 > lib/libSDL2.a
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 278353
: 249962