]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
libsatsolver: New package.
authorStefan Schantl <stefan.schantl@ipfire.org>
Sun, 10 Apr 2011 22:05:50 +0000 (00:05 +0200)
committerStefan Schantl <stefan.schantl@ipfire.org>
Sun, 10 Apr 2011 22:05:50 +0000 (00:05 +0200)
pkgs/libsatsolver/libsatsolver.nm [new file with mode: 0644]
pkgs/libsatsolver/patches/sat-solver-only-shared-libs.patch [new file with mode: 0644]

diff --git a/pkgs/libsatsolver/libsatsolver.nm b/pkgs/libsatsolver/libsatsolver.nm
new file mode 100644 (file)
index 0000000..655f3fc
--- /dev/null
@@ -0,0 +1,59 @@
+###############################################################################
+#                                                                             #
+# IPFire.org - A linux based firewall                                         #
+# Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt                 #
+#                                                                             #
+# This program is free software: you can redistribute it and/or modify        #
+# it under the terms of the GNU General Public License as published by        #
+# the Free Software Foundation, either version 3 of the License, or           #
+# (at your option) any later version.                                         #
+#                                                                             #
+# This program is distributed in the hope that it will be useful,             #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
+# GNU General Public License for more details.                                #
+#                                                                             #
+# You should have received a copy of the GNU General Public License           #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+###############################################################################
+
+###############################################################################
+# Definitions
+###############################################################################
+
+include $(PKGROOT)/Include
+
+PKG_NAME       = libsatsolver
+PKG_VER        = 0.16.4
+PKG_REL        = 1
+
+PKG_MAINTAINER =
+PKG_GROUPS     = System/Libraries
+PKG_URL        = http://gitorious.org/opensuse/sat-solver
+PKG_LICENSE    = BSD
+PKG_SUMMARY    = A SAT solver written in C++.
+
+PKG_BUILD_DEPS+= gcc-c++ cmake db4-devel expat-devel zlib-devel
+
+define PKG_DESCRIPTION
+       This package contains a very fast SAT resolver written in C++.
+endef
+
+PKG_TARBALL    = $(THISAPP).tar.bz2
+
+PKG_PACKAGES  += $(PKG_NAME)-devel
+
+# Define debian as distro to get weak of rpm header files.
+define STAGE_BUILD
+       cd $(DIR_APP) && mkdir build
+       cd $(DIR_APP)/build && cmake .. -DDEBIAN=1 \
+               -DCMAKE_INSTALL_PREFIX=/usr \
+               -DCMAKE_BUILD_TYPE=Release \
+               -DCMAKE_SKIP_RPATH=1
+       cd $(DIR_APP)/build && make $(PARALELLISMFLAGS)
+endef
+
+define STAGE_INSTALL
+       cd $(DIR_APP)/build && make install DESTDIR=$(BUILDROOT)
+endef
diff --git a/pkgs/libsatsolver/patches/sat-solver-only-shared-libs.patch b/pkgs/libsatsolver/patches/sat-solver-only-shared-libs.patch
new file mode 100644 (file)
index 0000000..ee9a92e
--- /dev/null
@@ -0,0 +1,83 @@
+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}")
+diff -Nur old/ext/CMakeLists.txt new/ext/CMakeLists.txt
+--- old/ext/CMakeLists.txt     2011-04-10 23:55:09.530257000 +0200
++++ new/ext/CMakeLists.txt     2011-04-10 18:51:42.217487001 +0200
+@@ -8,7 +8,7 @@
+     ${libsatsolverext_SRCS} pool_fileconflicts.c repo_rpmdb.c)
+ ENDIF (NOT DEBIAN)
+-ADD_LIBRARY(satsolverext STATIC ${libsatsolverext_SRCS})
++ADD_LIBRARY(satsolverext SHARED ${libsatsolverext_SRCS})
+ SET(libsatsolverext_HEADERS
+     pool_fileconflicts.h repo_content.h repo_deltainfoxml.h repo_helix.h repo_products.h
+@@ -16,7 +16,7 @@
+     repo_susetags.h repo_updateinfoxml.h repo_write.h repo_zyppdb.h
+     tools_util.h repo_deb.h sat_xfopen.h)
+-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
++SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -lexpat")
+ INSTALL(FILES ${libsatsolverext_HEADERS} DESTINATION "${CMAKE_INSTALL_PREFIX}/include/satsolver")
+ INSTALL(TARGETS satsolverext LIBRARY DESTINATION ${LIB_INSTALL_DIR} ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
+Binärdateien old/.git/index and new/.git/index sind verschieden.
+diff -Nur old/src/CMakeLists.txt new/src/CMakeLists.txt
+--- old/src/CMakeLists.txt     2011-04-10 23:55:09.536257000 +0200
++++ new/src/CMakeLists.txt     2011-04-10 23:52:01.689257003 +0200
+@@ -6,7 +6,7 @@
+     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(libsatsolver_HEADERS
+     bitmap.h evr.h hash.h policy.h poolarch.h poolvendor.h pool.h
+diff -Nur old/tools/CMakeLists.txt new/tools/CMakeLists.txt
+--- old/tools/CMakeLists.txt   2011-04-10 23:55:10.679257000 +0200
++++ new/tools/CMakeLists.txt   2011-04-10 23:53:42.340257007 +0200
+@@ -28,8 +28,8 @@
+ ADD_EXECUTABLE(updateinfoxml2solv updateinfoxml2solv.c)
+ TARGET_LINK_LIBRARIES(updateinfoxml2solv toolstuff satsolverext satsolver ${EXPAT_LIBRARY})
+-ADD_EXECUTABLE(deltainfoxml2solv deltainfoxml2solv.c)
+-TARGET_LINK_LIBRARIES(deltainfoxml2solv toolstuff satsolverext satsolver ${EXPAT_LIBRARY})
++#ADD_EXECUTABLE(deltainfoxml2solv deltainfoxml2solv.c)
++#TARGET_LINK_LIBRARIES(deltainfoxml2solv toolstuff satsolverext satsolver ${EXPAT_LIBRARY})
+ ADD_EXECUTABLE(repomdxml2solv repomdxml2solv.c)
+ TARGET_LINK_LIBRARIES(repomdxml2solv toolstuff satsolverext satsolver ${EXPAT_LIBRARY})
+@@ -53,7 +53,6 @@
+     helix2solv
+     rpmmd2solv
+     updateinfoxml2solv
+-    deltainfoxml2solv
+     repomdxml2solv
+     installcheck
+     DESTINATION ${BIN_INSTALL_DIR})