summaryrefslogtreecommitdiff
path: root/package/libjson
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-01-23 08:13:59 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2014-01-23 08:13:59 +0100
commit17a6468b3f0fae577b1aaad51b56bdefe15a25c1 (patch)
tree2e0ccfed1a6a8afb24c2547ca97ae5d8c450b717 /package/libjson
parent2548d641ca7adfe3dcf31d09bb2f9b047b186a0f (diff)
parentc66e4117d3ac4d561718a8b17066dc8b04a02027 (diff)
Merge branch 'master' of git+ssh://openadk.org/git/openadk
Diffstat (limited to 'package/libjson')
-rw-r--r--package/libjson/Makefile34
-rw-r--r--package/libjson/patches/patch-makefile50
2 files changed, 84 insertions, 0 deletions
diff --git a/package/libjson/Makefile b/package/libjson/Makefile
new file mode 100644
index 000000000..6520bd419
--- /dev/null
+++ b/package/libjson/Makefile
@@ -0,0 +1,34 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:= libjson
+PKG_VERSION:= 7.6.1
+PKG_RELEASE:= 1
+PKG_MD5SUM:= 82f3fcbf9f8cf3c4e25e1bdd77d65164
+PKG_DESCR:= JSON library
+PKG_SECTION:= libs
+PKG_URL:= http://sourceforge.net/projects/libjson/
+PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=libjson/}
+PKG_OPTS:= dev
+
+PKG_NOPARALLEL:= 1
+
+DISTFILES:= ${PKG_NAME}_${PKG_VERSION}.zip
+WRKDIST= ${WRKDIR}/${PKG_NAME}
+
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,LIBJSON,libjson,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
+
+MAKE_FILE:= makefile
+FAKE_FLAGS+= prefix=${WRKINST}/usr
+CONFIG_STYLE:= manual
+
+libjson-install:
+ $(INSTALL_DIR) $(IDIR_LIBJSON)/usr/lib
+ $(CP) $(WRKINST)/usr/lib/libjson*.so* \
+ $(IDIR_LIBJSON)/usr/lib
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/libjson/patches/patch-makefile b/package/libjson/patches/patch-makefile
new file mode 100644
index 000000000..919c6308c
--- /dev/null
+++ b/package/libjson/patches/patch-makefile
@@ -0,0 +1,50 @@
+--- libjson.orig/makefile 2014-01-17 20:38:29.584543459 +0100
++++ libjson/makefile 2014-01-17 20:38:14.372460375 +0100
+@@ -128,7 +128,7 @@ objects = internalJSONNode.o JSON
+ JSONDebug.o JSONIterators.o JSONMemory.o JSONNode.o \
+ JSONNode_Mutex.o JSONPreparse.o JSONStream.o JSONValidator.o \
+ JSONWorker.o JSONWriter.o libjson.o
+-OS=$(shell uname)
++OS=Linux
+
+ # Defaults
+ ifeq ($(OS), Darwin)
+@@ -158,8 +158,7 @@ srcdir ?= _internal/Source
+ CXX ?= c++
+ AR ?= ar
+ PIC ?= PIC
+-BUILD_TYPE ?= "default"
+-SHARED ?= "1"
++SHARED ?= 1
+
+
+ # Internal Variables
+@@ -237,18 +236,16 @@ endif
+
+ # Compile object files
+ $(objdir)/%.o: $(srcdir)/%.cpp
+- $(CXX) $< -o $@ -c $(CXXFLAGS)
++ $(CXX) $< -o $@ -c $(CPPFLAGS) $(CXXFLAGS)
+
+ ifeq ($(SHARED),1)
+ install: banner install_headers $(lib_target)
+ @echo "Install shared library"
++ mkdir -p $(inst_path)
+ cp -f ./$(lib_target) $(inst_path)
+ cd $(inst_path) ; \
+ ln -sf $(lib_target) $(libname_shared_major_version) ; \
+ ln -sf $(libname_shared_major_version) $(libname_shared)
+-ifneq ($(OS),Darwin)
+- ldconfig
+-endif
+ @echo "Install shared library: Done."
+ else
+ install: banner install_headers $(lib_target)
+@@ -266,7 +263,6 @@ install_headers: banner
+ cp -r ./$(srcdir)/JSONDefs $(include_path)/$(libname_hdr)/$(srcdir)
+ chmod -R a+r $(include_path)/$(libname_hdr)
+ find $(include_path)/$(libname_hdr) -type d -exec chmod a+x {} \;
+- cp -rv $(srcdir)/Dependencies/ $(include_path)/$(libname_hdr)/$(srcdir)
+ @echo "Install header files: Done."
+
+ clean: banner