After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 732920 - Support building against external synctex library
Support building against external synctex library
Status: RESOLVED OBSOLETE
Product: evince
Classification: Core
Component: general
3.12.x
Other Linux
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-07-08 19:41 UTC by Andreas Henriksson
Modified: 2018-05-22 15:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch against evince 3.12.1 (1.86 KB, patch)
2014-07-08 19:41 UTC, Andreas Henriksson
none Details | Review
patch against master (cc55d7383cf) (2.82 KB, patch)
2014-07-08 19:55 UTC, Andreas Henriksson
none Details | Review
Updated patch addressing Carlos' comments (2.52 KB, patch)
2018-05-19 02:41 UTC, Germán Poo-Caamaño
none Details | Review
Update patch addressing Carlos' comments (2.52 KB, patch)
2018-05-19 02:43 UTC, Germán Poo-Caamaño
none Details | Review

Description Andreas Henriksson 2014-07-08 19:41:58 UTC
Created attachment 280181 [details] [review]
patch against evince 3.12.1

Hello!

Someone in Debian made a synctex library package and filed:
http://bugs.debian.org/754136

I'm hoping that maybe you could consider supporting this option in the build system of evince.


(I'm attaching a patch I created against 3.12.1...)
Comment 1 Andreas Henriksson 2014-07-08 19:55:31 UTC
Created attachment 280182 [details] [review]
patch against master (cc55d7383cf)
Comment 2 Carlos Garcia Campos 2014-07-25 15:29:14 UTC
Review of attachment 280182 [details] [review]:

Thanks for the patch, it makes sense to me. I've a few comments/questions, though.

::: configure.ac
@@ +467,3 @@
+if test "x$has_synctex" = "xno"; then
+	SYNCTEX_LIBS="\$(top_builddir)/cut-n-paste/synctex/libsynctex.la"
+	AC_SUBST(SYNCTEX_LIBS)

Don't we need to do this out of the if also for the case where this has been filled by PKG_CHECK_MODULES?

@@ +470,3 @@
+
+	SYNCTEX_CFLAGS="-I\$(top_srcdir)/cut-n-paste/synctex"
+	AC_SUBST(SYNCTEX_CFLAGS)

Ditto

@@ +472,3 @@
+	AC_SUBST(SYNCTEX_CFLAGS)
+
+	SYNCTEX_CONFIG_FILES=cut-n-paste/synctex/Makefile

Do we really need this? I guess it doesn't matter if the Makefile is created as long as the syntex dir is not added to the SUBDIRS of the parent Makefile.

@@ +476,3 @@
+	SYNCTEX_CONFIG_FILES=""
+fi
+AM_CONDITIONAL(ENABLE_BUNDLED_SYNCTEX, test x$has_synctex = xno)

I prefer something like USE_INTERNAL_SYNTEX or USE_SYSTEM_SYNTEX

@@ +947,3 @@
 GTK+ Unix Print ..........:  $with_gtk_unix_print
 Thumbnail cache ..........:  $enable_gnome_desktop
+Use external SyncTeX .....:  $has_synctex

What about something like:

SyncTex ......: system/internal
Comment 3 Andreas Henriksson 2014-07-26 09:31:17 UTC
Hello Carlos!

Thanks for your review. I have to ask some questions back to you, probably because I just don't understand what you are saying. Sorry for that.

(In reply to comment #2)
> Review of attachment 280182 [details] [review]:
> 
> Thanks for the patch, it makes sense to me. I've a few comments/questions,
> though.
> 
> ::: configure.ac
> @@ +467,3 @@
> +if test "x$has_synctex" = "xno"; then
> +    SYNCTEX_LIBS="\$(top_builddir)/cut-n-paste/synctex/libsynctex.la"
> +    AC_SUBST(SYNCTEX_LIBS)
> 
> Don't we need to do this out of the if also for the case where this has been
> filled by PKG_CHECK_MODULES?

No?

Could you clarify what you mean by "this"? The cut-n-paste part should definitely only be set here, but maybe you mean only the AC_SUBST?
The AC_SUBST is still not needed elsewhere. I have tested building this patch (for 3.12.1) both with and without external libsynctex. I'm definitely no autotools guru, but I can see during the bulid that the CFLAGS / LIBS are properly set up by PKG_CHECK_MODULES when using external libsynctex.

> 
> @@ +470,3 @@
> +
> +    SYNCTEX_CFLAGS="-I\$(top_srcdir)/cut-n-paste/synctex"
> +    AC_SUBST(SYNCTEX_CFLAGS)
> 
> Ditto
> 
> @@ +472,3 @@
> +    AC_SUBST(SYNCTEX_CFLAGS)
> +
> +    SYNCTEX_CONFIG_FILES=cut-n-paste/synctex/Makefile
> 
> Do we really need this? I guess it doesn't matter if the Makefile is created as
> long as the syntex dir is not added to the SUBDIRS of the parent Makefile.

I've tested dropping the SYNCTEX_CONFIG_FILES part and it still builds fine, so if you prefer always generating this file even when unused we could do so.

> 
> @@ +476,3 @@
> +    SYNCTEX_CONFIG_FILES=""
> +fi
> +AM_CONDITIONAL(ENABLE_BUNDLED_SYNCTEX, test x$has_synctex = xno)
> 
> I prefer something like USE_INTERNAL_SYNTEX or USE_SYSTEM_SYNTEX
> 
> @@ +947,3 @@
>  GTK+ Unix Print ..........:  $with_gtk_unix_print
>  Thumbnail cache ..........:  $enable_gnome_desktop
> +Use external SyncTeX .....:  $has_synctex
> 
> What about something like:
> 
> SyncTex ......: system/internal

You mean like replacing:
PKG_CHECK_MODULES(SYNCTEX, [synctex], has_synctex=yes, has_synctex=no)
with:
PKG_CHECK_MODULES(SYNCTEX, [synctex], has_synctex=system, has_synctex=internal)
(updating the if check) and using:
SyncTex ......: $has_synctex

or do you have some nice way to suggest for accomplishing the pretty output?
Comment 4 Germán Poo-Caamaño 2018-05-19 02:41:27 UTC
Created attachment 372206 [details] [review]
Updated patch addressing Carlos' comments

This patch addresses Carlos' comments.

Even though Andreas is correct about PKG_CONFIG exporting CFLAGS and LIBS (using AC_SUBST), having them out of the condition is harmless, and easier to read.
Comment 5 Germán Poo-Caamaño 2018-05-19 02:43:24 UTC
Created attachment 372207 [details] [review]
Update patch addressing Carlos' comments

Oops. I attached the wrong one. Comments stay the same.
Comment 6 GNOME Infrastructure Team 2018-05-22 15:41:18 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/evince/issues/479.