pkgsrc-WIP-changes archive

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

sdl12-compat: Restore patch-CMakeLists.txt and minimize changes



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

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

Log Message:
sdl12-compat: Restore patch-CMakeLists.txt and minimize changes

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

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

diffstat:
 sdl12-compat/distinfo                     |  2 +-
 sdl12-compat/patches/patch-CMakeLists.txt | 32 ++++++++++++++++++++++++++-----
 2 files changed, 28 insertions(+), 6 deletions(-)

diffs:
diff --git a/sdl12-compat/distinfo b/sdl12-compat/distinfo
index 40c67b1256..d3f08e5f00 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) = ca704c6c1ce3d1f2e1f4350ffa4bb77818cee057
+SHA1 (patch-CMakeLists.txt) = de6b2ae057d1d3bc90fd9659eb3bab908fc44224
 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 2c68bd4d9f..340c01a8b4 100644
--- a/sdl12-compat/patches/patch-CMakeLists.txt
+++ b/sdl12-compat/patches/patch-CMakeLists.txt
@@ -1,15 +1,37 @@
 $NetBSD$
 
-# Fix -install_name on macOS
+# Not every unix system has libdl
+# Don't remove ${PREFIX}/lib from -install_name
 
---- CMakeLists.txt.orig	2023-10-31 12:38:32.952552647 +0000
+--- CMakeLists.txt.orig	2022-03-03 14:56:56.000000000 +0000
 +++ CMakeLists.txt
-@@ -74,7 +74,7 @@ if(UNIX AND NOT APPLE)
-     target_link_libraries(SDL PRIVATE dl)
+@@ -71,10 +71,9 @@ 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})
  endif()
  if(APPLE)
 -    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}")
+@@ -254,7 +253,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 +296,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")


Home | Main Index | Thread Index | Old Index