pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

sdl12-compat: Fix -install_name on macOS



Module Name:	pkgsrc-wip
Committed By:	Jason Bacon <bacon%NetBSD.org@localhost>
Pushed By:	outpaddling
Date:		Tue Oct 31 08:01:47 2023 -0500
Changeset:	2475dafebe45d57a922cad431f21340e6ad29dfa

Modified Files:
	sdl12-compat/Makefile
	sdl12-compat/distinfo
	sdl12-compat/patches/patch-CMakeLists.txt

Log Message:
sdl12-compat: Fix -install_name on macOS

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=2475dafebe45d57a922cad431f21340e6ad29dfa

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 sdl12-compat/Makefile                     | 10 -------
 sdl12-compat/distinfo                     |  2 +-
 sdl12-compat/patches/patch-CMakeLists.txt | 47 ++++++-------------------------
 3 files changed, 10 insertions(+), 49 deletions(-)

diffs:
diff --git a/sdl12-compat/Makefile b/sdl12-compat/Makefile
index aa677c1cc6..91be9dd664 100644
--- a/sdl12-compat/Makefile
+++ b/sdl12-compat/Makefile
@@ -17,16 +17,6 @@ CONFLICTS+=	SDL-[0-9]*
 
 PKGCONFIG_OVERRIDE+=	sdl12_compat.pc.in
 
-SUBST_CLASSES+=			install_name
-SUBST_STAGE.install_name=	post-configure
-SUBST_FILES.install_name=	CMakeFiles/SDL.dir/link.txt
-# With cmake policy CMP0068, @rpath is generated
-# SUBST_SED.install_name=		-e 's|@rpath|${PREFIX}/lib|g'
-# With cmake policy CMP0068 disabled, no directory is generated
-SUBST_SED.install_name=		-e 's|-install_name libSDL-1.2.0.dylib|-install_name ${PREFIX}/lib/libSDL-1.2.0.dylib|g'
-
-CMAKE_ARGS+=	-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
-
 post-install:
 	${RM} ${DESTDIR}${PREFIX}/include/SDL/*.orig
 
diff --git a/sdl12-compat/distinfo b/sdl12-compat/distinfo
index bb21e81cb9..40c67b1256 100644
--- a/sdl12-compat/distinfo
+++ b/sdl12-compat/distinfo
@@ -3,5 +3,5 @@ $NetBSD: distinfo,v 1.1 2022/04/01 10:43:05 nia Exp $
 BLAKE2s (sdl12-compat-1.2.52.tar.gz) = d8abf6a0bfa94472c664208232c654ea358aff157f4c14f8c508b887d7801479
 SHA512 (sdl12-compat-1.2.52.tar.gz) = cd8f34f61ee9c6d0bd635f4c7a6f3cfb6bb570976f3bf843f1e3893b3a86d087a40bdf5f6bb2de16c9534ec42bc846b6ff599ac557c3b088c447e6106e2558f9
 Size (sdl12-compat-1.2.52.tar.gz) = 421046 bytes
-SHA1 (patch-CMakeLists.txt) = 59342004380baa1cea92eb82fac37c6fa62ab6e9
+SHA1 (patch-CMakeLists.txt) = ca704c6c1ce3d1f2e1f4350ffa4bb77818cee057
 SHA1 (patch-include_SDL_SDL__config.h) = 96eb020bb246e111d4240f94f68a1f5e49222070
diff --git a/sdl12-compat/patches/patch-CMakeLists.txt b/sdl12-compat/patches/patch-CMakeLists.txt
index 2b4c7f94b0..2c68bd4d9f 100644
--- a/sdl12-compat/patches/patch-CMakeLists.txt
+++ b/sdl12-compat/patches/patch-CMakeLists.txt
@@ -1,44 +1,15 @@
 $NetBSD$
 
-# Fix install_name on macOS
+# Fix -install_name on macOS
 
---- CMakeLists.txt.orig	2022-03-03 14:56:56.000000000 +0000
+--- CMakeLists.txt.orig	2023-10-31 12:38:32.952552647 +0000
 +++ CMakeLists.txt
-@@ -24,10 +24,6 @@ if(APPLE)
-   set(DYLIB_COMPAT_VERSION 1.0.0 CACHE STRING "library compatibility version")
-   set(DYLIB_CURRENT_VERSION 12.52.0 CACHE STRING "library current version")
-   include_directories("/opt/X11/include")  # hack.
--  if(CMAKE_VERSION VERSION_LESS 3.9)
--  else()
--    cmake_policy(SET CMP0068 NEW)  # on macOS, don't let RPATH affect install_name.
--  endif()
- endif()
- 
- if(WIN32)
-@@ -71,7 +67,7 @@ string(STRIP "${CMAKE_C_FLAGS}" CMAKE_C_
- 
- if(UNIX AND NOT APPLE)
-     set_target_properties(SDL PROPERTIES COMPILE_DEFINITIONS "_REENTRANT")
--    target_link_libraries(SDL PRIVATE dl)
-+    target_link_libraries(SDL PRIVATE ${CMAKE_DL_LIBS})
+@@ -74,7 +74,7 @@ if(UNIX AND NOT APPLE)
+     target_link_libraries(SDL PRIVATE dl)
  endif()
  if(APPLE)
-     set_target_properties(SDL PROPERTIES INSTALL_NAME_DIR "")
-@@ -254,7 +250,7 @@ if(SDL12DEVEL)
-       set(SDL_CFLAGS "-D_GNU_SOURCE=1 -D_REENTRANT")
-       set(SDL_RLD_FLAGS "")  # !!! FIXME: this forces rpath, which we might want?
-       set(SDL_LIBS "-lSDL")
--      set(SDL_STATIC_LIBS "-ldl")
-+      set(SDL_STATIC_LIBS ${CMAKE_DL_LIBS})
-       if(NOT STATICDEVEL)
-         set(SDL_STATIC_LIBS "")
-       endif()
-@@ -297,7 +293,7 @@ if(STATICDEVEL AND SDL12DEVEL)
-   add_library(SDL-static STATIC ${SDL12COMPAT_SRCS})
-   target_include_directories(SDL-static PRIVATE ${SDL2_INCLUDE_DIRS})
-   set_target_properties(SDL-static PROPERTIES COMPILE_DEFINITIONS "_REENTRANT")
--  target_link_libraries(SDL-static PRIVATE dl)
-+  target_link_libraries(SDL-static PRIVATE ${CMAKE_DL_LIBS})
-   set_target_properties(SDL-static PROPERTIES
-           VERSION "${PROJECT_VERSION}"
-         OUTPUT_NAME "SDL")
+-    set_target_properties(SDL PROPERTIES INSTALL_NAME_DIR "")
++    # set_target_properties(SDL PROPERTIES INSTALL_NAME_DIR "")
+     set_target_properties(SDL PROPERTIES COMPILE_DEFINITIONS "_THREAD_SAFE")
+     set_target_properties(SDL PROPERTIES LINK_FLAGS
+             "-Wl,-compatibility_version,${DYLIB_COMPAT_VERSION} -Wl,-current_version,${DYLIB_CURRENT_VERSION}")


Home | Main Index | Thread Index | Old Index