Browse files

fix building against libsolv RPMs.

removes hardcoded include and lib paths
  • Loading branch information...
1 parent 6c2bb7c commit 0b40a193ee615e8c6c8d3560a9a405c5f6c53835 Ales Kozumplik committed Mar 9, 2012
Showing with 67 additions and 55 deletions.
  1. +2 −2 CMakeLists.txt
  2. +0 −5 src/CMakeLists.txt
  3. +2 −1 src/frepo.c
  4. +3 −3 src/goal.c
  5. +2 −2 src/goal.h
  6. +3 −3 src/iutil.c
  7. +4 −4 src/iutil.h
  8. +3 −3 src/main.c
  9. +4 −4 src/package.c
  10. +2 −1 src/package.h
  11. +6 −4 src/packagelist.c
  12. +3 −1 src/packagelist.h
  13. +1 −1 src/python/goal-py.c
  14. +1 −1 src/python/package-py.c
  15. +4 −1 src/python/query-py.c
  16. +8 −6 src/query.c
  17. +1 −0 src/query.h
  18. +14 −12 src/sack.c
  19. +4 −1 src/sack.h
View
4 CMakeLists.txt
@@ -11,8 +11,8 @@ INCLUDE_DIRECTORIES (${CMAKE_SOURCE_DIR})
FIND_PACKAGE (EXPAT REQUIRED)
FIND_PACKAGE (ZLIB REQUIRED)
FIND_LIBRARY (RPMDB_LIBRARY NAMES rpmdb)
-FIND_LIBRARY (SOLV_LIBRARY NAMES solv PATHS /home/akozumpl/libsolv/build/src)
-FIND_LIBRARY (SOLVEXT_LIBRARY NAMES solvext PATHS /home/akozumpl/libsolv/build/ext)
+FIND_LIBRARY (SOLV_LIBRARY NAMES solv)
+FIND_LIBRARY (SOLVEXT_LIBRARY NAMES solvext)
# rpm:
FIND_LIBRARY (RPMDB_LIBRARY NAMES rpmdb)
View
5 src/CMakeLists.txt
@@ -4,11 +4,6 @@ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} --std=c99")
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} --std=c99")
-INCLUDE_DIRECTORIES(/home/akozumpl/libsolv/src)
-INCLUDE_DIRECTORIES(/home/akozumpl/libsolv/ext)
-# just because of solvversion.h:
-INCLUDE_DIRECTORIES(/home/akozumpl/libsolv/build/src)
-
ADD_LIBRARY(libhawkey SHARED ${hawkey_SRCS})
TARGET_LINK_LIBRARIES(libhawkey ${SOLV_LIBRARY} ${SOLVEXT_LIBRARY})
TARGET_LINK_LIBRARIES(libhawkey ${EXPAT_LIBRARY} ${ZLIB_LIBRARY} ${RPMDB_LIBRARY})
View
3 src/frepo.c
@@ -1,6 +1,7 @@
#include <assert.h>
-#include "util.h"
+// libsolv
+#include "solv/util.h"
#include "frepo.h"
View
6 src/goal.c
@@ -2,9 +2,9 @@
#include <stdio.h>
// libsolv
-#include "solver.h"
-#include "solverdebug.h"
-#include "util.h"
+#include "solv/solver.h"
+#include "solv/solverdebug.h"
+#include "solv/util.h"
// hawkey
#include "goal.h"
View
4 src/goal.h
@@ -2,8 +2,8 @@
#define GOAL_H
// libsolv
-#include "queue.h"
-#include "transaction.h"
+#include "solv/queue.h"
+#include "solv/transaction.h"
// hawkey
#include "package.h"
View
6 src/iutil.c
@@ -3,9 +3,9 @@
#include <unistd.h>
// libsolv
-#include "evr.h"
-#include "solver.h"
-#include "solverdebug.h"
+#include "solv/evr.h"
+#include "solv/solver.h"
+#include "solv/solverdebug.h"
// hawkey
#include "iutil.h"
View
8 src/iutil.h
@@ -2,10 +2,10 @@
#define IUTIL_H
// libsolv
-#include "queue.h"
-#include "repo.h"
-#include "rules.h"
-#include "transaction.h"
+#include "solv/queue.h"
+#include "solv/repo.h"
+#include "solv/rules.h"
+#include "solv/transaction.h"
// hawkey
#include "packagelist.h"
View
6 src/main.c
@@ -2,9 +2,9 @@
#include <assert.h>
// libsolv
-#include "repo_rpmdb.h"
-#include "solver.h"
-#include "util.h"
+#include "solv/repo_rpmdb.h"
+#include "solv/solver.h"
+#include "solv/util.h"
// hawkey
#include "frepo.h"
View
8 src/package.c
@@ -1,8 +1,8 @@
//libsolv
-#include "evr.h"
-#include "pool.h"
-#include "repo.h"
-#include "util.h"
+#include "solv/evr.h"
+#include "solv/pool.h"
+#include "solv/repo.h"
+#include "solv/util.h"
// hawkey
#include "iutil.h"
View
3 src/package.h
@@ -1,7 +1,8 @@
#ifndef PACKAGE_H
#define PACKAGE_H
-#include "solvable.h"
+// libsolv
+#include "solv/solvable.h"
struct _Package {
Id id;
View
10 src/packagelist.c
@@ -1,10 +1,12 @@
#include "assert.h"
-#include "pool.h"
-#include "repo.h"
-#include "queue.h"
-#include "util.h"
+// libsolv
+#include "solv/pool.h"
+#include "solv/repo.h"
+#include "solv/queue.h"
+#include "solv/util.h"
+// hawkey
#include "packagelist.h"
#define BLOCK_SIZE 31
View
4 src/packagelist.h
@@ -1,8 +1,10 @@
#ifndef PACKAGELIST_H
#define PACKAGELIST_H
-#include "queue.h"
+// libsolv
+#include "solv/queue.h"
+// hawkey
#include "package.h"
#include "sack.h"
View
2 src/python/goal-py.c
@@ -3,7 +3,7 @@
#include <stddef.h>
// libsolv
-#include "util.h"
+#include "solv/util.h"
// hawkey
#include "src/goal.h"
View
2 src/python/package-py.c
@@ -2,7 +2,7 @@
#include <stdio.h>
// libsolv
-#include <util.h>
+#include <solv/util.h>
// pyhawkey
#include "iutil-py.h"
View
5 src/python/query-py.c
@@ -1,6 +1,9 @@
#include <Python.h>
-#include "util.h"
+// libsolv
+#include "solv/util.h"
+
+// hawkey
#include "src/query.h"
#include "hawkey-pysys.h"
#include "iutil-py.h"
View
14 src/query.c
@@ -1,13 +1,15 @@
#include <assert.h>
-#include "bitmap.h"
-#include "evr.h"
-#include "util.h"
-
+// libsolv
+#include "solv/bitmap.h"
+#include "solv/evr.h"
+#include "solv/repo.h"
+#include "solv/solver.h"
+#include "solv/util.h"
+
+// hawkey
#include "iutil.h"
#include "query.h"
-#include "repo.h"
-#include "solver.h"
#define BLOCK_SIZE 15
View
1 src/query.h
@@ -1,6 +1,7 @@
#ifndef QUERY_H
#define QUERY_H
+// hawkey
#include "sack.h"
#include "packagelist.h"
View
26 src/sack.c
@@ -6,18 +6,20 @@
#include <sys/utsname.h>
#include <unistd.h>
-#include "pool.h"
-#include "poolarch.h"
-#include "repo.h"
-#include "repo_repomdxml.h"
-#include "repo_rpmmd.h"
-#include "repo_rpmdb.h"
-#include "repo_solv.h"
-#include "repo_write.h"
-#include "solv_xfopen.h"
-#include "solver.h"
-#include "solverdebug.h"
-
+// libsolv
+#include "solv/pool.h"
+#include "solv/poolarch.h"
+#include "solv/repo.h"
+#include "solv/repo_repomdxml.h"
+#include "solv/repo_rpmmd.h"
+#include "solv/repo_rpmdb.h"
+#include "solv/repo_solv.h"
+#include "solv/repo_write.h"
+#include "solv/solv_xfopen.h"
+#include "solv/solver.h"
+#include "solv/solverdebug.h"
+
+// hawkey
#include "iutil.h"
#include "sack.h"
View
5 src/sack.h
@@ -1,9 +1,12 @@
#ifndef SACK_H
#define SACK_H
+// libsolv
+#include "solv/pool.h"
+
+// hawkey
#include "frepo.h"
#include "package.h"
-#include "pool.h"
#define SYSTEM_REPO_NAME "@System"
#define CMDLINE_REPO_NAME "@commandline"

0 comments on commit 0b40a19

Please sign in to comment.