From df66aa35e70648155f62f7650c5eade1ec73288f Mon Sep 17 00:00:00 2001 From: Xiangfu Liu Date: Sun, 30 May 2010 11:59:38 +0800 Subject: [PATCH] [sdcv] fix compile errors. thanks to jirka. --- sdcv/Makefile | 6 +++--- sdcv/patches/libcpp-retype.patch | 24 ++++++++++++++++++++++++ sdcv/patches/readline-free.patch | 10 ++++++++++ 3 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 sdcv/patches/libcpp-retype.patch create mode 100644 sdcv/patches/readline-free.patch diff --git a/sdcv/Makefile b/sdcv/Makefile index fdfdc35..df9b33f 100644 --- a/sdcv/Makefile +++ b/sdcv/Makefile @@ -16,7 +16,7 @@ PKG_SOURCE_URL:=http://cdnetworks-kr-1.dl.sourceforge.net/project/sdcv/sdcv/0.4. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL:=1 +PKG_INSTALL:=2 include $(INCLUDE_DIR)/package.mk @@ -24,7 +24,7 @@ define Package/sdcv TITLE:=sdcv SECTION:=utils CATEGORY:=Utilities - DEPENDS:=@BROKEN +libintl + DEPENDS:=+libintl +libreadline +libiconv URL:=http://sdcv.sourceforge.net/ endef @@ -33,7 +33,7 @@ define Package/sdcv/description endef TARGET_CFLAGS+=-I$(STAGING_DIR)/usr/lib/libintl/include -TARGET_LDFLAGS+= -L$(STAGING_DIR)/usr/lib/libintl/lib +TARGET_LDFLAGS+= -L$(STAGING_DIR)/usr/lib/libintl/lib -L$(STAGING_DIR)/usr/lib/libiconv/lib CONFIGURE_ARGS += diff --git a/sdcv/patches/libcpp-retype.patch b/sdcv/patches/libcpp-retype.patch new file mode 100644 index 0000000..a6f585c --- /dev/null +++ b/sdcv/patches/libcpp-retype.patch @@ -0,0 +1,24 @@ +--- sdcv-0.4.2/src/lib/lib.cpp 2006-04-24 10:17:27.000000000 +0200 ++++ sdcv-0.4.2m/src/lib/lib.cpp 2010-05-28 19:03:20.000000000 +0200 +@@ -5,10 +5,12 @@ + #include + #include + #include ++#include + + #include + #include + #include ++#include + + #include "distance.h" + #include "file.hpp" +@@ -513,7 +515,7 @@ + { + fseek(idxfile, wordoffset[page_idx], SEEK_SET); + guint32 page_size=wordoffset[page_idx+1]-wordoffset[page_idx]; +- fread(wordentry_buf, std::min(sizeof(wordentry_buf), page_size), 1, idxfile); //TODO: check returned values, deal with word entry that strlen>255. ++ fread(wordentry_buf, std::min((long)sizeof(wordentry_buf), (long)page_size), 1, idxfile); //TODO: check returned values, deal with word entry that strlen>255. + return wordentry_buf; + } + diff --git a/sdcv/patches/readline-free.patch b/sdcv/patches/readline-free.patch new file mode 100644 index 0000000..a0fa69b --- /dev/null +++ b/sdcv/patches/readline-free.patch @@ -0,0 +1,10 @@ +--- sdcv-0.4.2/src/readline.cpp 2005-12-07 23:07:23.000000000 +0100 ++++ sdcv-0.4.2m/src/readline.cpp 2010-05-28 19:24:28.000000000 +0200 +@@ -28,6 +28,7 @@ + # include + #endif + #include ++#include + + #include "utils.hpp" +