libsatsolver -> libsolv as the latter is used by pakfire 3 now.

This commit is contained in:
Michael Tremer
2011-08-06 19:14:26 +02:00
parent f99f4293e7
commit b297f5173b
4 changed files with 12 additions and 129 deletions

View File

@@ -24,17 +24,17 @@
include Config
VER = 0.16.4-c57e9df
VER = 0.0.0-0db9d7f
THISAPP = libsatsolver-$(VER)
THISAPP = libsolv-$(VER)
DL_FILE = $(THISAPP).tar.gz
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
PROG = libsatsolver
PROG = libsolv
DEPS = ""
PAK_VER = 2
PAK_VER = 1
###############################################################################
# Top-level Rules
@@ -44,7 +44,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_MD5 = 756cae7df92fd3faa0a49883378d8c98
$(DL_FILE)_MD5 = ba95c404d807bc71297c508a7127a3d9
install : $(TARGET)
@@ -77,15 +77,18 @@ $(subst %,%_MD5,$(objects)) :
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/libsatsolver-Build-only-libraries.patch
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/libsatsolver-Make-libsatsolver-ext-a-versioned-shared-lib.patch
# Who releases code with -Werror?
cd $(DIR_APP) && sed -e "s/-Werror//g" -i CMakeLists.txt
# Disable bindings, examples and tools.
cd $(DIR_APP) && sed "/bindings/d" -i CMakeLists.txt
cd $(DIR_APP) && sed "/examples/d" -i CMakeLists.txt
cd $(DIR_APP) && sed "/tools/d" -i CMakeLists.txt
# Make sure that libsatsolverext is linked properly to all needed
# libraries.
cd $(DIR_APP) && echo "TARGET_LINK_LIBRARIES(satsolverext satsolver \$${EXPAT_LIBRARY} \$${ZLIB_LIBRARY})" \
cd $(DIR_APP) && echo "TARGET_LINK_LIBRARIES(libsolvext libsolv \$${EXPAT_LIBRARY} \$${ZLIB_LIBRARY})" \
>> ext/CMakeLists.txt
# Remove the RPM stuff when we build with -DFEDORA=1 because we

View File

@@ -692,7 +692,7 @@ buildipfire() {
ipfiremake python-m2crypto
ipfiremake wireless-regdb
ipfiremake crda
ipfiremake libsatsolver
ipfiremake libsolv
ipfiremake python-distutils-extra
ipfiremake python-lzma
ipfiremake python-progressbar

View File

@@ -1,26 +0,0 @@
diff -Nur old/CMakeLists.txt new/CMakeLists.txt
--- old/CMakeLists.txt 2011-04-10 23:55:09.506257000 +0200
+++ new/CMakeLists.txt 2011-04-10 23:46:30.612257002 +0200
@@ -32,7 +32,7 @@
INCLUDE( ${CMAKE_SOURCE_DIR}/VERSION.cmake )
FIND_PACKAGE(EXPAT REQUIRED)
-FIND_PACKAGE(Check REQUIRED)
+#FIND_PACKAGE(Check REQUIRED)
FIND_PACKAGE(ZLIB REQUIRED)
IF ( FEDORA )
@@ -190,10 +190,10 @@
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(ext)
-ADD_SUBDIRECTORY(tools)
-ADD_SUBDIRECTORY(tests)
-ADD_SUBDIRECTORY(examples)
-ADD_SUBDIRECTORY(doc)
+#ADD_SUBDIRECTORY(tools)
+#ADD_SUBDIRECTORY(tests)
+#ADD_SUBDIRECTORY(examples)
+#ADD_SUBDIRECTORY(doc)
MESSAGE(STATUS "version: ${VERSION}")

View File

@@ -1,94 +0,0 @@
>From 1f9659b55013f222046b9d161fd5a0f2fc399cb8 Mon Sep 17 00:00:00 2001
From: Michael Tremer <michael.tremer@ipfire.org>
Date: Thu, 21 Apr 2011 12:48:41 +0200
Subject: [PATCH] Make libsatsolver{,ext} a versioned shared lib.
Most distributions only do accept shared libraries because of
relro and hardening stuff.
Previously, libsatsolver was statically compiled because the ABI
was assumed to be changed from time to time but has now become
very stable.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
---
ext/CMakeLists.txt | 6 +++++-
src/CMakeLists.txt | 6 +++++-
tools/CMakeLists.txt | 12 ++++++------
3 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/ext/CMakeLists.txt b/ext/CMakeLists.txt
index 8e71eee..68e1c3c 100644
--- a/ext/CMakeLists.txt
+++ b/ext/CMakeLists.txt
@@ -8,7 +8,11 @@ SET(libsatsolverext_SRCS
${libsatsolverext_SRCS} pool_fileconflicts.c repo_rpmdb.c)
ENDIF (NOT DEBIAN)
-ADD_LIBRARY(satsolverext STATIC ${libsatsolverext_SRCS})
+ADD_LIBRARY(satsolverext SHARED ${libsatsolverext_SRCS})
+SET_TARGET_PROPERTIES(satsolverext PROPERTIES
+ VERSION "${LIBSATSOLVER_MAJOR}.${LIBSATSOLVER_MINOR}"
+ SOVERSION "${LIBSATSOLVER_MAJOR}"
+)
SET(libsatsolverext_HEADERS
pool_fileconflicts.h repo_content.h repo_deltainfoxml.h repo_helix.h repo_products.h
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 9bd0fde..6a14d10 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -6,7 +6,11 @@ SET(libsatsolver_SRCS
transaction.c rules.c problems.c
chksum.c md5.c sha1.c sha2.c satversion.c)
-ADD_LIBRARY(satsolver STATIC ${libsatsolver_SRCS})
+ADD_LIBRARY(satsolver SHARED ${libsatsolver_SRCS})
+SET_TARGET_PROPERTIES(satsolver PROPERTIES
+ VERSION "${LIBSATSOLVER_MAJOR}.${LIBSATSOLVER_MINOR}"
+ SOVERSION "${LIBSATSOLVER_MAJOR}"
+)
SET(libsatsolver_HEADERS
bitmap.h evr.h hash.h policy.h poolarch.h poolvendor.h pool.h
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index 79d4890..7696612 100644
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -20,19 +20,19 @@ ADD_EXECUTABLE(rpmmd2solv rpmmd2solv.c)
TARGET_LINK_LIBRARIES(rpmmd2solv toolstuff satsolverext satsolver ${EXPAT_LIBRARY} ${ZLIB_LIBRARY})
ADD_EXECUTABLE(helix2solv helix2solv.c)
-TARGET_LINK_LIBRARIES(helix2solv toolstuff satsolverext satsolver ${EXPAT_LIBRARY})
+TARGET_LINK_LIBRARIES(helix2solv toolstuff satsolverext satsolver ${EXPAT_LIBRARY} ${ZLIB_LIBRARY})
ADD_EXECUTABLE(susetags2solv susetags2solv.c)
-TARGET_LINK_LIBRARIES(susetags2solv toolstuff satsolverext satsolver ${ZLIB_LIBRARY})
+TARGET_LINK_LIBRARIES(susetags2solv toolstuff satsolverext satsolver ${EXPAT_LIBRARY} ${ZLIB_LIBRARY})
ADD_EXECUTABLE(updateinfoxml2solv updateinfoxml2solv.c)
-TARGET_LINK_LIBRARIES(updateinfoxml2solv toolstuff satsolverext satsolver ${EXPAT_LIBRARY})
+TARGET_LINK_LIBRARIES(updateinfoxml2solv toolstuff satsolverext satsolver ${EXPAT_LIBRARY} ${ZLIB_LIBRARY})
ADD_EXECUTABLE(deltainfoxml2solv deltainfoxml2solv.c)
-TARGET_LINK_LIBRARIES(deltainfoxml2solv toolstuff satsolverext satsolver ${EXPAT_LIBRARY})
+TARGET_LINK_LIBRARIES(deltainfoxml2solv toolstuff satsolverext satsolver ${EXPAT_LIBRARY} ${ZLIB_LIBRARY})
ADD_EXECUTABLE(repomdxml2solv repomdxml2solv.c)
-TARGET_LINK_LIBRARIES(repomdxml2solv toolstuff satsolverext satsolver ${EXPAT_LIBRARY})
+TARGET_LINK_LIBRARIES(repomdxml2solv toolstuff satsolverext satsolver ${EXPAT_LIBRARY} ${ZLIB_LIBRARY})
ADD_EXECUTABLE(installcheck installcheck.c)
TARGET_LINK_LIBRARIES(installcheck satsolverext satsolver ${EXPAT_LIBRARY} ${ZLIB_LIBRARY})
@@ -44,7 +44,7 @@ ADD_EXECUTABLE(dumpsolv dumpsolv.c )
TARGET_LINK_LIBRARIES(dumpsolv satsolver)
ADD_EXECUTABLE(mergesolv mergesolv.c )
-TARGET_LINK_LIBRARIES(mergesolv toolstuff satsolverext satsolver)
+TARGET_LINK_LIBRARIES(mergesolv toolstuff satsolverext satsolver ${EXPAT_LIBRARY} ${ZLIB_LIBRARY})
install(TARGETS
mergesolv
--
1.7.4.4