libsundisasm
This commit is contained in:
parent
54a0409ab6
commit
6f8d0fe113
|
@ -0,0 +1,10 @@
|
|||
Real sources are in the package illumos-source-X.Y,
|
||||
where X and Y are numbers. Exact values of X and Y
|
||||
are set in Build-Depends field of debian/control as
|
||||
well as in the version string in debian/changelog,
|
||||
in a form of X.Y-1.
|
||||
|
||||
To add a patch you need first to unpack files from
|
||||
illumos-source-X.Y using ./debian/rules unpack
|
||||
and, desirably, ./debian/rules patch
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
libsundisasm (2.10-1) unstable; urgency=low
|
||||
|
||||
* Initial release.
|
||||
|
||||
-- Igor Pashev <pashev.igor@gmail.com> Thu, 25 Apr 2013 19:41:08 +0400
|
|
@ -0,0 +1 @@
|
|||
9
|
|
@ -0,0 +1,87 @@
|
|||
Source: libsundisasm
|
||||
Section: libs
|
||||
Priority: optional
|
||||
Maintainer: Igor Pashev <pashev.igor@gmail.com>
|
||||
Build-Depends:
|
||||
dh-illumos,
|
||||
gcc-multilib [illumos-amd64],
|
||||
illumos-source-2.10,
|
||||
quilt,
|
||||
symlinks,
|
||||
Standards-Version: 3.9.3
|
||||
Homepage: https://www.illumos.org
|
||||
|
||||
Package: libsundisasm1
|
||||
Section: libs
|
||||
Multi-Arch: same
|
||||
Pre-Depends: ${misc:Pre-Depends}
|
||||
Architecture: illumos-any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: illumos disassembler library
|
||||
This package contains libsundisasm shared library.
|
||||
.
|
||||
The libsundisasm is mostly used by illumos modular debugger (mdb) to
|
||||
disassemble binary code
|
||||
|
||||
Package: libsundisasm1-dev
|
||||
Section: libdevel
|
||||
Architecture: illumos-any
|
||||
Provides: libsundisasm-dev
|
||||
Depends: libsundisasm1 (= ${binary:Version}), ${misc:Depends},
|
||||
libelf-dev | libsunelf-dev | libelfg0-dev,
|
||||
Description: illumos disassembler library (development files)
|
||||
This package contains the header files and symlinks needed to compile
|
||||
applications that use libsundisasm.
|
||||
.
|
||||
The libsundisasm is mostly used by illumos modular debugger (mdb) to
|
||||
disassemble binary code
|
||||
|
||||
Package: lib32sundisasm1
|
||||
Section: libs
|
||||
Architecture: illumos-amd64
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: illumos disassembler library (32 bit)
|
||||
This package contains libsundisasm shared library.
|
||||
.
|
||||
The libsundisasm is mostly used by illumos modular debugger (mdb) to
|
||||
disassemble binary code
|
||||
.
|
||||
This is a 32-bit version of the library.
|
||||
|
||||
Package: lib32sundisasm1-dev
|
||||
Section: libdevel
|
||||
Architecture: illumos-amd64
|
||||
Provides: lib32sundisasm-dev
|
||||
Depends: lib32sundisasm1 (= ${binary:Version}), libsundisasm1-dev (= ${binary:Version}),
|
||||
${misc:Depends}
|
||||
Description: illumos disassembler library (32-bit development files)
|
||||
This package contains files needed to compile 32-bit applications that
|
||||
use libsundisasm.
|
||||
.
|
||||
The libsundisasm is mostly used by illumos modular debugger (mdb) to
|
||||
disassemble binary code
|
||||
|
||||
|
||||
Package: libstanddisasm-dev
|
||||
Section: libdevel
|
||||
Multi-Arch: same
|
||||
Pre-Depends: ${misc:Pre-Depends}
|
||||
Architecture: illumos-any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, libsundisasm1-dev (= ${binary:Version})
|
||||
Description: illumos standalone disassembler library
|
||||
This package contains libstanddisasm shared library.
|
||||
The libstanddisasm library is used to compile kernel part of illumos modular
|
||||
debugger (kmdb)
|
||||
|
||||
|
||||
Package: lib32standdisasm-dev
|
||||
Section: libdevel
|
||||
Pre-Depends: ${misc:Pre-Depends}
|
||||
Architecture: illumos-amd64
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, libsundisasm1-dev (= ${binary:Version})
|
||||
Description: illumos standalone disassembler library (32 bit)
|
||||
This package contains libstanddisasm shared library.
|
||||
The libstanddisasm library is used to compile kernel part of illumos modular
|
||||
debugger (kmdb)
|
||||
.
|
||||
This is a 32-bit version of the library.
|
|
@ -0,0 +1,27 @@
|
|||
Files: debian/*
|
||||
Copyright: 2012, Igor Pashev <pashev.igor@gmail.com>
|
||||
License: WTFPL-2
|
||||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||
Version 2, December 2004
|
||||
.
|
||||
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
|
||||
.
|
||||
Everyone is permitted to copy and distribute verbatim or modified
|
||||
copies of this license document, and changing it is allowed as long
|
||||
as the name is changed.
|
||||
.
|
||||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
.
|
||||
0. You just DO WHAT THE FUCK YOU WANT TO.
|
||||
|
||||
|
||||
Files: *
|
||||
License: CDDL
|
||||
Note that sources are not in this package but in the package
|
||||
illumos-source-X.Y. Those sources are covered by Common Development
|
||||
and Distribution License (CDDL).
|
||||
.
|
||||
On Dyson system, the full text of the CDDL license
|
||||
can be found in the file `/usr/share/common-licenses/CDDL-1.0'.
|
||||
|
|
@ -0,0 +1 @@
|
|||
usr/lib32/libstanddisasm.so
|
|
@ -0,0 +1 @@
|
|||
usr/lib32/libsundisasm.so
|
|
@ -0,0 +1 @@
|
|||
usr/lib32/libsundisasm.so.1
|
|
@ -0,0 +1 @@
|
|||
usr/lib/*/libstanddisasm.so
|
|
@ -0,0 +1,3 @@
|
|||
usr/lib/*/libsundisasm.so
|
||||
usr/include/libsundisasm.h
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
usr/src/man/man3sundisasm/sundisasm_*
|
||||
usr/src/man/man3lib/libsundisasm*
|
|
@ -0,0 +1 @@
|
|||
usr/lib/*/libsundisasm.so.1
|
|
@ -0,0 +1,12 @@
|
|||
libsundisasm.so.1 libsundisasm1 #MINVER#
|
||||
SUNWprivate_1.1@SUNWprivate_1.1 2.10-1
|
||||
dis_disassemble@SUNWprivate_1.1 2.10-1
|
||||
dis_errno@SUNWprivate_1.1 2.10-1
|
||||
dis_flags_clear@SUNWprivate_1.1 2.10-1
|
||||
dis_flags_set@SUNWprivate_1.1 2.10-1
|
||||
dis_handle_create@SUNWprivate_1.1 2.10-1
|
||||
dis_handle_destroy@SUNWprivate_1.1 2.10-1
|
||||
dis_max_instrlen@SUNWprivate_1.1 2.10-1
|
||||
dis_previnstr@SUNWprivate_1.1 2.10-1
|
||||
dis_set_data@SUNWprivate_1.1 2.10-1
|
||||
dis_strerror@SUNWprivate_1.1 2.10-1
|
|
@ -0,0 +1,15 @@
|
|||
Index: libdisasm/usr/src/lib/libdisasm/common/libdisasm.c
|
||||
===================================================================
|
||||
--- libdisasm.orig/usr/src/lib/libdisasm/common/libdisasm.c 2012-10-08 04:25:38.000000000 +0400
|
||||
+++ libdisasm/usr/src/lib/libdisasm/common/libdisasm.c 2013-04-25 17:35:47.233137515 +0400
|
||||
@@ -29,7 +29,9 @@
|
||||
#include <libdisasm.h>
|
||||
#include <stdlib.h>
|
||||
#ifdef DIS_STANDALONE
|
||||
-#include <mdb/mdb_modapi.h>
|
||||
+extern void *mdb_zalloc(size_t, uint_t);
|
||||
+extern void mdb_free(void *, size_t);
|
||||
+#define UM_SLEEP 0x1 /* Can block for memory; will always succeed */
|
||||
#endif
|
||||
|
||||
static int _dis_errno;
|
|
@ -0,0 +1,14 @@
|
|||
Index: libdisasm/usr/src/lib/libdisasm/i386/dis_i386.c
|
||||
===================================================================
|
||||
--- libdisasm.orig/usr/src/lib/libdisasm/i386/dis_i386.c 2012-10-08 04:25:38.000000000 +0400
|
||||
+++ libdisasm/usr/src/lib/libdisasm/i386/dis_i386.c 2013-04-25 16:13:12.992381005 +0400
|
||||
@@ -193,7 +193,9 @@
|
||||
return (15);
|
||||
}
|
||||
|
||||
+#ifndef MIN
|
||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* Return the previous instruction. On x86, we have no choice except to
|
|
@ -0,0 +1,13 @@
|
|||
Index: libdisasm/usr/src/lib/libdisasm/Makefile.com
|
||||
===================================================================
|
||||
--- libdisasm.orig/usr/src/lib/libdisasm/Makefile.com 2012-10-08 04:25:38.000000000 +0400
|
||||
+++ libdisasm/usr/src/lib/libdisasm/Makefile.com 2013-04-25 17:53:58.202145966 +0400
|
||||
@@ -33,7 +33,7 @@
|
||||
# between both environments, so all paths must be absolute.
|
||||
#
|
||||
|
||||
-LIBRARY= libdisasm.a
|
||||
+LIBRARY= libsundisasm.a
|
||||
STANDLIBRARY= libstanddisasm.so
|
||||
VERS= .1
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
libsundisasm-min.patch
|
||||
libsundisasm-avoid-mdb.patch
|
||||
rename-libdisasm.patch
|
|
@ -0,0 +1,104 @@
|
|||
#!/usr/bin/make -f
|
||||
|
||||
include /usr/share/dpkg/architecture.mk
|
||||
export DH_VERBOSE = 1
|
||||
|
||||
# libs having "install_h" target to install headers:
|
||||
libs_headers := \
|
||||
libdisasm
|
||||
|
||||
# All libraries to build and to package.
|
||||
# Order is important:
|
||||
libs := $(libs_headers) \
|
||||
|
||||
mans := \
|
||||
|
||||
unpack: unpack-stamp
|
||||
unpack-stamp:
|
||||
dh_testdir
|
||||
dh_illumos_gate --build \
|
||||
usr/src/common/dis \
|
||||
$(libs:%=usr/src/lib/%) \
|
||||
$(mans) \
|
||||
|
||||
|
||||
# Not used and buggy:
|
||||
echo > usr/src/Makefile.msg.targ
|
||||
echo 'export SAVEARGS=' >> usr/env.sh
|
||||
touch $@
|
||||
|
||||
patch: patch-stamp
|
||||
patch-stamp: unpack-stamp
|
||||
dh_testdir
|
||||
[ ! -f debian/patches/series ] || QUILT_PATCHES=debian/patches quilt push -a || test $$? = 2
|
||||
touch $@
|
||||
|
||||
unpatch:
|
||||
dh_testdir
|
||||
[ ! -f debian/patches/series ] || QUILT_PATCHES=debian/patches quilt pop -a -f || test $$? = 2
|
||||
rm -f patch-stamp
|
||||
|
||||
dirs-stamp:
|
||||
. usr/env.sh; mkdir -p \
|
||||
debian/tmp/usr/include \
|
||||
debian/tmp$$DEB_LIBDIR_32 \
|
||||
debian/tmp$$DEB_LIBDIR_64 \
|
||||
debian/tmp$$DEB_USRLIBDIR_32 \
|
||||
debian/tmp$$DEB_USRLIBDIR_64
|
||||
touch $@
|
||||
|
||||
headers-stamp: patch-stamp dirs-stamp
|
||||
dh_illumos_make -t install_h $(libs:%=usr/src/lib/%)
|
||||
touch $@
|
||||
|
||||
install: install-stamp
|
||||
install-stamp: build-stamp
|
||||
# Move dev symlink from /lib into /usr/lib:
|
||||
for l in `find debian/tmp/lib32 -maxdepth 1 -type l -name \*.so`; do \
|
||||
ln -sf `readlink -f $$l` debian/tmp/usr/lib32/`basename $$l`; \
|
||||
rm $$l; \
|
||||
done
|
||||
for l in `find debian/tmp/lib/$(DEB_HOST_MULTIARCH) -maxdepth 1 -type l -name \*.so`; do \
|
||||
ln -sf `readlink -f $$l` debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/`basename $$l`; \
|
||||
rm $$l; \
|
||||
done
|
||||
mv debian/tmp/usr/include/libdisasm.h \
|
||||
debian/tmp/usr/include/libsundisasm.h
|
||||
# Make symlinks relative:
|
||||
symlinks -c debian/tmp/usr/lib32
|
||||
symlinks -c debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)
|
||||
touch $@
|
||||
|
||||
build build-arch build-indep: build-stamp
|
||||
build-stamp: patch-stamp dirs-stamp headers-stamp
|
||||
dh_illumos_make $(libs:%=usr/src/lib/%) -m sunmake
|
||||
touch $@
|
||||
|
||||
binary binary-arch binary-indep: binary-stamp
|
||||
binary-stamp: install-stamp
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_installdirs
|
||||
dh_install
|
||||
dh_installman
|
||||
dh_installdocs
|
||||
dh_installexamples
|
||||
dh_installchangelogs
|
||||
dh_link
|
||||
dh_compress
|
||||
dh_fixperms
|
||||
dh_makeshlibs -- -c4
|
||||
dh_installdeb
|
||||
dh_shlibdeps
|
||||
dh_strip -X libstanddisasm.so
|
||||
dh_gencontrol
|
||||
dh_md5sums
|
||||
dh_builddeb
|
||||
touch $@
|
||||
|
||||
clean: unpatch
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_clean
|
||||
rm -rf usr .pc
|
||||
|
|
@ -0,0 +1 @@
|
|||
3.0 (native)
|
Loading…
Reference in New Issue