Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed patching #378

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tools/cmdata/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ FetchContent_Declare(
popt
URL https://github.com/rpm-software-management/popt/archive/refs/heads/master.zip
GIT_TAG 2bca0aa
PATCH_COMMAND patch -R --directory=${FETCHCONTENT_BASE_DIR}/popt-src --strip=1 < ${CMAKE_CURRENT_SOURCE_DIR}/popt.patch
PATCH_COMMAND patch --directory=${FETCHCONTENT_BASE_DIR}/popt-src -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/popt.patch
)
FetchContent_MakeAvailable(popt)

Expand Down
61 changes: 31 additions & 30 deletions tools/cmdata/popt.patch
Original file line number Diff line number Diff line change
@@ -1,41 +1,42 @@
--- CMakeLists.txt 2024-03-14 15:45:17
+++ CMakeLists.txt.orig 2024-03-04 10:42:51
@@ -103,7 +103,12 @@

diff --color -Naur popt_orig/CMakeLists.txt popt_patch/CMakeLists.txt
--- popt_orig/CMakeLists.txt 2024-03-14 16:24:38.310420219 +0100
+++ popt_patch/CMakeLists.txt 2024-03-14 16:25:42.162353238 +0100
@@ -79,12 +79,6 @@
endif()

add_subdirectory(src)
+add_subdirectory(doc)
-add_subdirectory(doc)
if (EXISTS po/popt.pot)
add_subdirectory(po)
endif()
+# Enable testing
+include(CTest)
+enable_testing()
+add_subdirectory(tests)
diff --color -ruN popt/src/CMakeLists.txt popto/src/CMakeLists.txt
--- popt/src/CMakeLists.txt 2024-03-01 14:48:37.837697092 +0100
+++ popto/src/CMakeLists.txt 2024-03-01 14:16:44.198234990 +0100
@@ -25,15 +25,13 @@
-
-# Enable testing
-include(CTest)
-enable_testing()
-add_subdirectory(tests)
diff --color -Naur popt_orig/src/CMakeLists.txt popt_patch/src/CMakeLists.txt
--- popt_orig/src/CMakeLists.txt 2024-03-14 16:23:52.010463824 +0100
+++ popt_patch/src/CMakeLists.txt 2024-03-14 16:26:29.646298783 +0100
@@ -25,13 +25,15 @@
endif()

set_target_properties(popt PROPERTIES
- VERSION ${PROJECT_VERSION}
- SOVERSION ${POPT_SOVERSION}
- C_STANDARD 99
- C_STANDARD_REQUIRED ON
- C_EXTENSIONS ON
- PUBLIC_HEADER popt.h
- if(not APPLE)
- LINK_FLAGS "-Wl,--no-undefined -Wl,--version-script,\"${PROJECT_SOURCE_DIR}/src/libpopt.vers\""
- endif()
+ VERSION ${PROJECT_VERSION}
+ SOVERSION ${POPT_SOVERSION}
+ C_STANDARD 99
+ C_STANDARD_REQUIRED ON
+ C_EXTENSIONS ON
+ PUBLIC_HEADER popt.h
+ LINK_FLAGS "-Wl,--no-undefined -Wl,--version-script,\"${PROJECT_SOURCE_DIR}/src/libpopt.vers\""
- VERSION ${PROJECT_VERSION}
- SOVERSION ${POPT_SOVERSION}
- C_STANDARD 99
- C_STANDARD_REQUIRED ON
- C_EXTENSIONS ON
- PUBLIC_HEADER popt.h
- LINK_FLAGS "-Wl,--no-undefined -Wl,--version-script,\"${PROJECT_SOURCE_DIR}/src/libpopt.vers\""
+ VERSION ${PROJECT_VERSION}
+ SOVERSION ${POPT_SOVERSION}
+ C_STANDARD 99
+ C_STANDARD_REQUIRED ON
+ C_EXTENSIONS ON
+ PUBLIC_HEADER popt.h
+ if(not APPLE)
+ LINK_FLAGS "-Wl,--no-undefined -Wl,--version-script,\"${PROJECT_SOURCE_DIR}/src/libpopt.vers\""
+ endif()
)

# Install the library