[sosi2osm] 10/19: Fixed build of sosi2osm package
Ruben Undheim
rubund-guest at moszumanska.debian.org
Sat Oct 4 13:08:53 UTC 2014
This is an automated email from the git hooks/post-receive script.
rubund-guest pushed a commit to branch master
in repository sosi2osm.
commit 2cbe610d2ea815fcc66037e7f06a0d6a8b48901a
Author: Ruben Undheim <ruben.undheim at gmail.com>
Date: Fri Sep 5 17:27:46 2014 +0000
Fixed build of sosi2osm package
---
debian/patches/01_fix_libsearchpath.patch | 13 ++++++++++
debian/patches/find_fyba_header_files.patch | 11 --------
debian/patches/find_lua_files.patch | 39 -----------------------------
debian/patches/series | 3 +--
debian/rules | 4 +++
5 files changed, 18 insertions(+), 52 deletions(-)
diff --git a/debian/patches/01_fix_libsearchpath.patch b/debian/patches/01_fix_libsearchpath.patch
new file mode 100644
index 0000000..4dab12f
--- /dev/null
+++ b/debian/patches/01_fix_libsearchpath.patch
@@ -0,0 +1,13 @@
+Index: sosi2osm/Makefile
+===================================================================
+--- sosi2osm.orig/Makefile
++++ sosi2osm/Makefile
+@@ -1,7 +1,7 @@
+ PROGNAME=sosi2osm
+ OBJFILES=sosi2osm.o sosi.o tag.o node.o
+
+-CPPFLAGS = -I/usr/local/include/fyba -I/usr/include/fyba/ `pkg-config --cflags lua5.1-c++` -DLINUX -DUNIX -g
++CPPFLAGS = -I/usr/include/fyba `pkg-config --cflags lua5.1-c++` -DLINUX -DUNIX -g
+ LDFLAGS = -lfyba -lfygm -lfyut -lproj `pkg-config --libs lua5.1-c++`
+
+ all: $(PROGNAME)
diff --git a/debian/patches/find_fyba_header_files.patch b/debian/patches/find_fyba_header_files.patch
deleted file mode 100644
index 61f8ec2..0000000
--- a/debian/patches/find_fyba_header_files.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- sosi2osm-20140707git634fc65.orig/Makefile
-+++ sosi2osm-20140707git634fc65/Makefile
-@@ -1,7 +1,7 @@
- PROGNAME=sosi2osm
- OBJFILES=sosi2osm.o sosi.o tag.o node.o
-
--CPPFLAGS = -I /usr/local/include/fyba/ `pkg-config --cflags lua5.1-c++` -DLINUX -DUNIX -g
-+CPPFLAGS = -I /usr/include/fyba/ `pkg-config --cflags lua5.1-c++` -DLINUX -DUNIX -g
- LDFLAGS = -lfyba -lfygm -lfyut -lproj `pkg-config --libs lua5.1-c++`
-
- all: $(PROGNAME)
diff --git a/debian/patches/find_lua_files.patch b/debian/patches/find_lua_files.patch
deleted file mode 100644
index 643b6f0..0000000
--- a/debian/patches/find_lua_files.patch
+++ /dev/null
@@ -1,39 +0,0 @@
---- sosi2osm-20140707git634fc65.orig/tag.cpp
-+++ sosi2osm-20140707git634fc65/tag.cpp
-@@ -37,7 +37,7 @@ void loadLua(char* filename) {
- luaL_openlibs(state);
-
- char library_filename[256];
-- snprintf(library_filename, 256, "%s/lua/sosi2osm.lua", dirname(execname));
-+ snprintf(library_filename, 256, "/usr/share/sosi2osm/lua/sosi2osm.lua");
-
- int r = luaL_loadfile(state, library_filename);
- if (r) {
-@@ -46,10 +46,23 @@ void loadLua(char* filename) {
- }
- lua_call(state, 0, 0);
-
-- r = luaL_loadfile(state, filename);
-- if (r) {
-- fprintf(stderr, "Failed to load lua file %s\n", filename);
-- exit(1);
-+ FILE *file;
-+ if((file = fopen(filename, "r")))
-+ {
-+ fclose(file);
-+ r = luaL_loadfile(state, filename);
-+ if(r) {
-+ fprintf(stderr, "Failed to load lua file %s\n", filename);
-+ exit(1);
-+ }
-+ }
-+ else {
-+ snprintf(library_filename, 256, "/usr/share/sosi2osm/lua/%s",filename);
-+ r = luaL_loadfile(state, library_filename);
-+ if(r) {
-+ fprintf(stderr, "Failed to load lua file %s\n", filename);
-+ exit(1);
-+ }
- }
-
-
diff --git a/debian/patches/series b/debian/patches/series
index 8428d2e..d6b74e7 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1 @@
-find_lua_files.patch
-find_fyba_header_files.patch
+01_fix_libsearchpath.patch
diff --git a/debian/rules b/debian/rules
index 79fd842..fa48316 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,3 +6,7 @@
%:
dh $@
+
+override_dh_auto_install:
+
+
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/sosi2osm.git
More information about the Pkg-grass-devel
mailing list