[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#749924: texlive-bin: Please provide synctex_parser as shared library



Control: tags -1 + patch

Hi Norbert

On 2014-06-03 18:13:53, Norbert Preining wrote:
> > I think it would be a good idea to provide a shared library containing
> > the code from synctex_parser so that the many different projects can use
> > the shared library instead of embedding the code.
> 
> Fully agreed.
> 
> > Please let me know if I can help providing such a shared library in some
> > way.
> 
> Sure, if you can look into the code, both of synctex and Makefile
> and allow for building a shared lib, I will happily include
> this in the Debian packaging.

Here is a first debdiff that contains a patch to build a shared library
and adds Debian packages for the new shared library.

> The problem is that upstream TeX Live does not use *any* shlibs at
> all, not even libkpathsea. So we are on our own here ...

Is there any chance at all to get this applied upstream?

Cheers
-- 
Sebastian Ramacher
diff -Nru texlive-bin-2014.20140528.34243/debian/changelog texlive-bin-2014.20140528.34243/debian/changelog
--- texlive-bin-2014.20140528.34243/debian/changelog	2014-05-30 11:08:04.000000000 +0200
+++ texlive-bin-2014.20140528.34243/debian/changelog	2014-06-25 19:52:11.000000000 +0200
@@ -1,3 +1,15 @@
+texlive-bin (2014.20140528.34243-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Build shared library for synctex_parser.
+    - debian/patches/synctex_parser.patch: Patch build system to build
+      synctex_parser as shared library.
+    - debian/control: Add packages for the shared library and development
+      files.
+    - debian/rules: Adopt for new binary packages.
+
+ -- Sebastian Ramacher <sramacher@debian.org>  Wed, 25 Jun 2014 19:47:57 +0200
+
 texlive-bin (2014.20140528.34243-2) unstable; urgency=medium
 
   * disable building of luajittex on s390x, hppa (Closes: #749718)
diff -Nru texlive-bin-2014.20140528.34243/debian/control texlive-bin-2014.20140528.34243/debian/control
--- texlive-bin-2014.20140528.34243/debian/control	2014-05-30 11:08:04.000000000 +0200
+++ texlive-bin-2014.20140528.34243/debian/control	2014-06-03 16:54:22.000000000 +0200
@@ -60,6 +60,21 @@
  ptexenc library, a library for encoding support in pTeX, a Japanese
  TeX engine.
 
+Package: libsynctex-parser1
+Section: libs
+Architecture: any
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Description: TeX Live: SyncTeX parser library
+ Library for SyncTeX parsing support.
+
+Package: libsynctex-parser-dev
+Section: libdevel
+Architecture: any
+Depends: ${misc:Depends}, libsynctex-parser1 (= ${binary:Version})
+Description: Tex Live: SyncTeX parser library (development part)
+ This package contains the static library and header files for the SyncTex
+ parser library.
+
 Package: luatex
 Section: oldlibs
 Priority: extra
diff -Nru texlive-bin-2014.20140528.34243/debian/libsynctex-parser1.install texlive-bin-2014.20140528.34243/debian/libsynctex-parser1.install
--- texlive-bin-2014.20140528.34243/debian/libsynctex-parser1.install	1970-01-01 01:00:00.000000000 +0100
+++ texlive-bin-2014.20140528.34243/debian/libsynctex-parser1.install	2014-06-03 16:23:01.000000000 +0200
@@ -0,0 +1 @@
+usr/lib/libsynctex_parser.so.*
diff -Nru texlive-bin-2014.20140528.34243/debian/libsynctex-parser-dev.install texlive-bin-2014.20140528.34243/debian/libsynctex-parser-dev.install
--- texlive-bin-2014.20140528.34243/debian/libsynctex-parser-dev.install	1970-01-01 01:00:00.000000000 +0100
+++ texlive-bin-2014.20140528.34243/debian/libsynctex-parser-dev.install	2014-06-03 16:23:11.000000000 +0200
@@ -0,0 +1,2 @@
+usr/lib/libsynctex_parser.so
+usr/include/synctex_parser.h
diff -Nru texlive-bin-2014.20140528.34243/debian/patches/series texlive-bin-2014.20140528.34243/debian/patches/series
--- texlive-bin-2014.20140528.34243/debian/patches/series	2014-05-30 11:08:04.000000000 +0200
+++ texlive-bin-2014.20140528.34243/debian/patches/series	2014-06-03 15:15:36.000000000 +0200
@@ -8,3 +8,4 @@
 pmpost-mp1.902
 upmpost-mp1.902
 ac-ctie
+syntex-lib.patch
diff -Nru texlive-bin-2014.20140528.34243/debian/patches/syntex-lib.patch texlive-bin-2014.20140528.34243/debian/patches/syntex-lib.patch
--- texlive-bin-2014.20140528.34243/debian/patches/syntex-lib.patch	1970-01-01 01:00:00.000000000 +0100
+++ texlive-bin-2014.20140528.34243/debian/patches/syntex-lib.patch	2014-06-25 19:44:30.000000000 +0200
@@ -0,0 +1,89 @@
+Description: Build syntex_parser as shared library
+ Also provide a file for pkg-config.
+Author: Sebastian Ramacher <sramacher@debian.org>
+Last-Update: 204-06-25
+
+Index: texlive-bin-2014.20140528.34243/texk/web2c/synctexdir/am/synctex.am
+===================================================================
+--- texlive-bin-2014.20140528.34243.orig/texk/web2c/synctexdir/am/synctex.am
++++ texlive-bin-2014.20140528.34243/texk/web2c/synctexdir/am/synctex.am
+@@ -7,19 +7,35 @@
+ 
+ bin_PROGRAMS += synctex
+ 
+-synctex_SOURCES = \
+-	synctexdir/synctex_main.c \
++lib_LTLIBRARIES = libsynctex_parser.la
++
++libsynctex_parser_la_SOURCES = \
+ 	synctexdir/synctex_parser.c \
+-	synctexdir/synctex_parser.h \
+ 	synctexdir/synctex_parser_local.h \
+-	synctexdir/synctex_parser_utils.h \
+ 	synctexdir/synctex_parser_utils.c
+ 
+-synctex_CPPFLAGS = -I$(srcdir)/synctexdir $(ZLIB_INCLUDES) -DSYNCTEX_USE_LOCAL_HEADER
++libsynctex_parser_la_CPPFLAGS = -I$(srcdir)/synctexdir $(ZLIB_INCLUDES) -DSYNCTEX_USE_LOCAL_HEADER
++
++libsynctex_parser_la_LIBADD = $(ZLIB_LIBS)
++
++libsynctex_parser_la_LDFLAGS = \
++	-version-info 1:17:0
++
++$(libsynctex_parser_la_OBJECTS): $(ZLIB_DEPEND)
++
++include_HEADERS = \
++	synctexdir/synctex_parser.h \
++	synctexdir/synctex_parser_utils.h
++
++pkgconfigdir = $(libdir)/pkgconfig
++pkgconfig_DATA = synctexdir/synctex-parser.pc
++
++synctex_SOURCES = \
++	synctexdir/synctex_main.c
+ 
+-synctex_LDADD = $(ZLIB_LIBS)
++synctex_CPPFLAGS = -I$(srcdir)/synctexdir
+ 
+-$(synctex_OBJECTS): $(ZLIB_DEPEND)
++synctex_LDADD = libsynctex_parser.la
+ 
+ dist_man_MANS += synctexdir/man1/synctex.1 synctexdir/man5/synctex.5
+ 
+@@ -28,6 +44,7 @@ EXTRA_DIST += \
+ 	synctexdir/README.txt \
+ 	synctexdir/synctex_parser_readme.txt \
+ 	synctexdir/synctex_parser_version.txt \
++	synctexdir/synctex-parser.pc.in \
+ 	synctexdir/tests
+ 
+ ## SyncTeX infrastructure: common for all engines
+Index: texlive-bin-2014.20140528.34243/texk/web2c/synctexdir/synctex-parser.pc.in
+===================================================================
+--- /dev/null
++++ texlive-bin-2014.20140528.34243/texk/web2c/synctexdir/synctex-parser.pc.in
+@@ -0,0 +1,12 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: synctex-parser
++Description: SyncTeX parser library
++Version: 1.17
++Requires.private: zlib
++Libs: -L${libdir} -lsynctex_parser
++Cflags: -I${includedir}
++
+Index: texlive-bin-2014.20140528.34243/texk/web2c/configure.ac
+===================================================================
+--- texlive-bin-2014.20140528.34243.orig/texk/web2c/configure.ac
++++ texlive-bin-2014.20140528.34243/texk/web2c/configure.ac
+@@ -392,6 +392,7 @@ AC_CONFIG_FILES([web2c-sh], [chmod +x we
+ AC_CONFIG_FILES([tangle-sh], [chmod +x tangle-sh])
+ AC_CONFIG_FILES([ctangleboot-sh], [chmod +x ctangleboot-sh])
+ AC_CONFIG_FILES([silent-sh], [chmod +x silent-sh])
++AC_CONFIG_FILES([synctexdir/synctex-parser.pc])
+ 
+ dnl The subdirectory web2c must be configured for the build system.
+ dnl When cross compiling, can not share the cache file with the subdirectory!
diff -Nru texlive-bin-2014.20140528.34243/debian/rules texlive-bin-2014.20140528.34243/debian/rules
--- texlive-bin-2014.20140528.34243/debian/rules	2014-05-30 11:08:04.000000000 +0200
+++ texlive-bin-2014.20140528.34243/debian/rules	2014-06-03 16:37:54.000000000 +0200
@@ -148,11 +148,13 @@
 override_dh_makeshlibs:
 	dh_makeshlibs -plibkpathsea6
 	dh_makeshlibs -plibptexenc1
+	dh_makeshlibs -plibsynctex-parser1
 
 override_dh_shlibdeps:
 	dh_shlibdeps \
 		-l debian/libkpathsea6/usr/lib \
-		-l debian/libptexenc1/usr/lib
+		-l debian/libptexenc1/usr/lib \
+		-l debian/libsynctex-parser1/usr/lib
 
 override_dh_clean:
 	dh_clean -X.orig

Attachment: signature.asc
Description: Digital signature


Reply to: