summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2012-10-19 07:04:20 +0400
committerIgor Pashev <pashev.igor@gmail.com>2012-10-19 07:43:17 +0400
commitd3f6f48808f466782c1769e4b220d8d926cca840 (patch)
treeceb0fe73b9c3fd2d5edcaabf99e2d62cd0f1aceb
parentf997355e5700f64f8b48789c3ba63463fb53a28f (diff)
downloadillumos-packaging-d3f6f48808f466782c1769e4b220d8d926cca840.tar.gz
Package libsunavl1-dev
-rw-r--r--libc/debian/control31
-rw-r--r--libc/debian/lib32sunavl1-dev.install2
-rw-r--r--libc/debian/libsunavl1-dev.install3
-rw-r--r--libc/debian/patches/rename-libavl.patch119
-rwxr-xr-xlibc/debian/rules4
5 files changed, 157 insertions, 2 deletions
diff --git a/libc/debian/control b/libc/debian/control
index 9267b23..ed42f0c 100644
--- a/libc/debian/control
+++ b/libc/debian/control
@@ -170,3 +170,34 @@ Description: illumos ELF library: development files (32-bit)
Library itself is in libc1-illumos-i386 package under
the name libsunelf.so.1. This package provides symlinks
libsunelf.so and libelf.so under /usr/lib32/
+
+Package: libsunavl1-dev
+Architecture: illumos-any
+Priority: optional
+Section: libdevel
+Provides: libsunavl-dev
+Depends: ${misc:Depends}, libc1 (= ${binary:Version}), unix-libc-dev
+Conflicts: libavl1-dev, libavl-dev
+Description: illumos AVL tree library: development files
+ Contains the symlinks and headers needed to compile
+ applications using illumos/solaris AVL tree library.
+ .
+ Library itself is in libc1 package under the name libsunavl.so.1.
+ This package provides symlinks libsunavl.so and libavl.so
+ and headers under /usr/include/libsunavl/
+
+Package: lib32sunavl1-dev
+Architecture: illumos-amd64
+Priority: optional
+Section: libdevel
+Provides: lib32sunavl-dev
+Depends: ${misc:Depends}, libc1-illumos-i386 (= ${binary:Version}),
+ libc1-dev-illumos-i386 (= ${binary:Version}), libsunavl1-dev (= ${binary:Version})
+Conflicts: lib32avl1-dev, lib32avl-dev
+Description: illumos AVL tree library: development files (32-bit)
+ Contains the symlinks and headers needed to compile
+ 32-bit applications using illumos/solaris AVL tree library.
+ .
+ Library itself is in libc1-illumos-i386 package under
+ the name libsunavl.so.1. This package provides symlinks
+ libsunavl.so and libavl.so under /usr/lib32/
diff --git a/libc/debian/lib32sunavl1-dev.install b/libc/debian/lib32sunavl1-dev.install
new file mode 100644
index 0000000..e02fb55
--- /dev/null
+++ b/libc/debian/lib32sunavl1-dev.install
@@ -0,0 +1,2 @@
+usr/lib32/libsunavl.so
+usr/lib32/libavl.so
diff --git a/libc/debian/libsunavl1-dev.install b/libc/debian/libsunavl1-dev.install
new file mode 100644
index 0000000..d481b0e
--- /dev/null
+++ b/libc/debian/libsunavl1-dev.install
@@ -0,0 +1,3 @@
+usr/include/libsunavl/avl*.h
+usr/lib/*/libsunavl.so
+usr/lib/*/libavl.so
diff --git a/libc/debian/patches/rename-libavl.patch b/libc/debian/patches/rename-libavl.patch
index c88b1f8..2ca59a7 100644
--- a/libc/debian/patches/rename-libavl.patch
+++ b/libc/debian/patches/rename-libavl.patch
@@ -1,7 +1,18 @@
+Description: There are too many AVL tree libraries
+ We rename libavl.so.1 to libsunavl.so.1 and make this library
+ public - install headers into /usr/include/libsunavl/
+ .
+ These headers are taken from usr/src/uts/common/sys/
+ .
+ All illumos userspace components should use headers from
+ /usr/include/libsunavl/ and must be linked to libsunavl.so.1
+ .
+ Also note, kernel AVL headers are still here under /usr/include/sys/
+ and used by other kernel headers.
Index: libc/illumos-gate/usr/src/lib/libavl/Makefile.com
===================================================================
---- libc.orig/illumos-gate/usr/src/lib/libavl/Makefile.com 2012-09-30 20:41:21.000000000 +0400
-+++ libc/illumos-gate/usr/src/lib/libavl/Makefile.com 2012-10-02 04:04:32.281026142 +0400
+--- libc.orig/illumos-gate/usr/src/lib/libavl/Makefile.com 2012-10-08 04:25:38.000000000 +0400
++++ libc/illumos-gate/usr/src/lib/libavl/Makefile.com 2012-10-19 04:33:57.657549526 +0400
@@ -25,7 +25,7 @@
# ident "%Z%%M% %I% %E% SMI"
#
@@ -11,3 +22,107 @@ Index: libc/illumos-gate/usr/src/lib/libavl/Makefile.com
VERS= .1
OBJECTS= avl.o
+Index: libc/illumos-gate/usr/src/uts/common/sys/avl.h
+===================================================================
+--- libc.orig/illumos-gate/usr/src/uts/common/sys/avl.h 2012-10-08 04:25:58.000000000 +0400
++++ libc/illumos-gate/usr/src/uts/common/sys/avl.h 2012-10-19 04:33:57.659147581 +0400
+@@ -36,7 +36,7 @@
+ #endif
+
+ #include <sys/types.h>
+-#include <sys/avl_impl.h>
++#include <libsunavl/avl_impl.h>
+
+ /*
+ * This is a generic implemenatation of AVL trees for use in the Solaris kernel.
+Index: libc/illumos-gate/usr/src/cmd/sgs/include/_string_table.h
+===================================================================
+--- libc.orig/illumos-gate/usr/src/cmd/sgs/include/_string_table.h 2012-10-08 04:25:33.000000000 +0400
++++ libc/illumos-gate/usr/src/cmd/sgs/include/_string_table.h 2012-10-19 04:33:57.660651297 +0400
+@@ -29,7 +29,7 @@
+ #pragma ident "%Z%%M% %I% %E% SMI"
+
+ #include <sys/types.h>
+-#include <sys/avl.h>
++#include <libsunavl/avl.h>
+ #include <string_table.h>
+
+ #ifdef __cplusplus
+Index: libc/illumos-gate/usr/src/cmd/sgs/include/libld.h
+===================================================================
+--- libc.orig/illumos-gate/usr/src/cmd/sgs/include/libld.h 2012-10-08 04:25:33.000000000 +0400
++++ libc/illumos-gate/usr/src/cmd/sgs/include/libld.h 2012-10-19 04:33:57.663132492 +0400
+@@ -34,7 +34,7 @@
+ #include <sgs.h>
+ #include <_machelf.h>
+ #include <string_table.h>
+-#include <sys/avl.h>
++#include <libsunavl/avl.h>
+ #include <alist.h>
+ #include <elfcap.h>
+
+Index: libc/illumos-gate/usr/src/cmd/sgs/include/rtld.h
+===================================================================
+--- libc.orig/illumos-gate/usr/src/cmd/sgs/include/rtld.h 2012-10-08 04:25:33.000000000 +0400
++++ libc/illumos-gate/usr/src/cmd/sgs/include/rtld.h 2012-10-19 04:33:57.664609694 +0400
+@@ -34,7 +34,7 @@
+ #include <thread.h>
+ #include <synch.h>
+ #include <link.h>
+-#include <sys/avl.h>
++#include <libsunavl/avl.h>
+ #include <alist.h>
+ #include <libc_int.h>
+ #include <elfcap.h>
+Index: libc/illumos-gate/usr/src/cmd/sgs/rtld/common/_rtld.h
+===================================================================
+--- libc.orig/illumos-gate/usr/src/cmd/sgs/rtld/common/_rtld.h 2012-10-08 04:25:33.000000000 +0400
++++ libc/illumos-gate/usr/src/cmd/sgs/rtld/common/_rtld.h 2012-10-19 04:33:57.666164715 +0400
+@@ -33,7 +33,7 @@
+ */
+ #include <sys/types.h>
+ #include <sys/stat.h>
+-#include <sys/avl.h>
++#include <libsunavl/avl.h>
+ #include <sys/mman.h>
+ #include <stdarg.h>
+ #include <synch.h>
+Index: libc/illumos-gate/usr/src/cmd/sgs/rtld/common/remove.c
+===================================================================
+--- libc.orig/illumos-gate/usr/src/cmd/sgs/rtld/common/remove.c 2012-10-08 04:25:33.000000000 +0400
++++ libc/illumos-gate/usr/src/cmd/sgs/rtld/common/remove.c 2012-10-19 04:33:57.667634065 +0400
+@@ -54,7 +54,7 @@
+ #include <unistd.h>
+ #include <dlfcn.h>
+ #include <sys/debug.h>
+-#include <sys/avl.h>
++#include <libsunavl/avl.h>
+ #include <libc_int.h>
+ #include <debug.h>
+ #include "_rtld.h"
+Index: libc/illumos-gate/usr/src/common/avl/avl.c
+===================================================================
+--- libc.orig/illumos-gate/usr/src/common/avl/avl.c 2012-10-08 04:25:34.000000000 +0400
++++ libc/illumos-gate/usr/src/common/avl/avl.c 2012-10-19 04:35:57.757101655 +0400
+@@ -90,7 +90,7 @@
+ #include <sys/types.h>
+ #include <sys/param.h>
+ #include <sys/debug.h>
+-#include <sys/avl.h>
++#include <libsunavl/avl.h>
+ #include <sys/cmn_err.h>
+
+ /*
+Index: libc/illumos-gate/usr/src/cmd/sgs/tools/Makefile.com
+===================================================================
+--- libc.orig/illumos-gate/usr/src/cmd/sgs/tools/Makefile.com 2012-10-08 04:25:33.000000000 +0400
++++ libc/illumos-gate/usr/src/cmd/sgs/tools/Makefile.com 2012-10-19 06:45:34.761955095 +0400
+@@ -52,7 +52,7 @@
+ SGSMSG_SRCS= $(TOOL_OBJS:%.o=../common/%.c) \
+ $(AVLOBJ:%.o=$(VAR_AVLDIR)/%.c)
+
+-$(SGSMSG_OBJS) := NATIVECC_CFLAGS += -I../../include $(VAR_TOOLS_CPPFLAGS)
++$(SGSMSG_OBJS) := NATIVECC_CFLAGS += -I$(ROOT)/usr/include -I../../include $(VAR_TOOLS_CPPFLAGS)
+
+ PROGS= $(COMOBJS:%.o=%)
+ NATIVE= $(NATOBJS:%.o=%) sgsmsg
diff --git a/libc/debian/rules b/libc/debian/rules
index 87b3b50..f25ad40 100755
--- a/libc/debian/rules
+++ b/libc/debian/rules
@@ -137,6 +137,10 @@ dirs-stamp:
headers-stamp: patch-stamp dirs-stamp fix-x-stamp
dh_illumos_make $(make) usr/src/head -t install_h
dh_illumos_make $(make) $(libs_headers:%=usr/src/lib/%) -t install_h
+ # Make AVL tree library public ;-)
+ mkdir -p debian/tmp/usr/include/libsunavl
+ cp illumos-gate/usr/src/uts/common/sys/avl*.h \
+ debian/tmp/usr/include/libsunavl/
touch $@
lib-stamp: headers-stamp