Re: Ghostscript 9.18 packaging

2016-02-11 Thread Damian Dimmich

Hi Jonas,

Yes - hit the wrong button - meant to write to the list.

So, following your advice I've added the variable in - this gets us much 
of the way there, although still fails to build cups., and with cups 
disabled, uses the wrong -llib_openjpeg which should be -lopenjpeg in 
the .tr files, which I think are generated, so my patch to these is a 
bit worthless as the changes get overwritten during clean/build.


I've tried fiddling with one of the older patches to get that to change 
but to no avail.


I'm officially stuck at the moment - might try and have another stab at 
this next week!


Have attached a patch of where I have gotten to though.

Thank you for all the help to date,

Damian
On 11/02/2016 00:28, Jonas Smedegaard wrote:

[replying via public list, assuming simple error]

Quoting Damian Dimmich (2016-02-10 11:43:38)

Update regarding the issue - in base/tiff.mak $(TIFFCONFIG_H) and
$(TIFFCONF_H) are both incorrectly configured and point to
/libtiff/tiff_config.h and /libtiff/tiffconfig.h respectively (neither
of which exist).

As far as I can tell, both of these should be pointing to
/usr/include/x86_64-linux-gnu/tiffconf.h - I believe these are
synonymous.

Ahh - then I almost had it nailed few days ago - but failed at grep'ing
too narrowly for "config" among libtiff5-dev filenames :-P


   That conf file predates a configure-compatible macro

for tiff and is just used by 'legacy' applications,
of which I am guessing GS is one of.

The probably "correct", long-term fix, would be to get GS to use the
libtiff make macro.

If trying to get that straightened out, it seems there is alother bug in
configure.ac setting LIBTIFFCONFDIR (not TIFFCONFDIR).



In the short term I was able to get GS to build by replacing the
incorrect variables to point to /usr/include/x86_64-linux-gnu/tiffconf.h

Clearly, this isn't a good solution, as its nowhere near cross platform.

That said, I'm not quite sure how to proceed as there is no tiff-config
command.

Maybe if we can get TIFFCONFIG_H overrided at build time, using
/usr/lib/$(DEB_HOST_MULTIARCH) <- that variable is available to us at
build time.


  - Jonas



>From c5d15f9a2c8d0426dd057a1fbaff9831b05320d1 Mon Sep 17 00:00:00 2001
From: Damian Dimmich 
Date: Wed, 10 Feb 2016 07:39:11 +
Subject: [PATCH] trying to get this to build on sid with 9.18

---
 debian/patches/020151014~e126995.patch |  2 +-
 debian/patches/name-of-my-patch.diff   | 62 ++
 debian/patches/series  |  1 +
 3 files changed, 64 insertions(+), 1 deletion(-)
 create mode 100644 debian/patches/name-of-my-patch.diff

diff --git a/debian/patches/020151014~e126995.patch 
b/debian/patches/020151014~e126995.patch
index 1cf1c1e..ec3b9f2 100644
--- a/debian/patches/020151014~e126995.patch
+++ b/debian/patches/020151014~e126995.patch
@@ -4762,7 +4762,7 @@ Last-Update: 2016-02-07
 - $(MAKEDIRS)
 +$(OPEN_JPEG_GEN)openjpeg_1.dev : $(OPEN_JPEG_MAK) $(ECHOGS_XE) \
 + $(OPEN_JPEG_MAK) $(MAKEDIRS)
-   $(SETMOD) $(OPEN_JPEG_GEN)openjpeg_1 -lib lib_openjpeg
+   $(SETMOD) $(OPEN_JPEG_GEN)openjpeg_1 -lib openjpeg
  
  # compile our own .dev
 -$(OPEN_JPEG_GEN)openjpeg_0.dev : $(TOP_MAKEFILES) $(OPEN_JPEG_MAK) 
$(ECHOGS_XE) $(open_jpeg_OBJS) \
diff --git a/debian/patches/name-of-my-patch.diff 
b/debian/patches/name-of-my-patch.diff
new file mode 100644
index 000..b0c1a73
--- /dev/null
+++ b/debian/patches/name-of-my-patch.diff
@@ -0,0 +1,62 @@
+Description: 
+ 
+Author: 
+Origin: , 
+Bug: 
+Bug-: 
+Forwarded: 
+Applied-Upstream: 
+Reviewed-by: 
+Last-Update: <-MM-DD, last update of the meta-information, optional>
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/base/tiff.mak
 b/base/tiff.mak
+@@ -27,8 +27,10 @@ TIFFOBJ=$(TIFFOBJDIR)$(D)
+ TIFFO_=$(O_)$(TIFFOBJ)
+ JPEGGEN=$(JGENDIR)$(D)
+ 
+-TIFFCONFIG_H=$(TIFFCONF)libtiff$(D)tif_config$(TIFFCONFIG_SUFFIX).h
+-TIFFCONF_H=$(TIFFCONF)libtiff$(D)tiffconf$(TIFFCONFIG_SUFFIX).h
++# TIFFCONFIG_H=$(TIFFCONF)libtiff$(D)tif_config$(TIFFCONFIG_SUFFIX).h
++TIFFCONFIG_H=/usr/include/x86_64-linux-gnu/tiffconf.h
++TIFFCONF_H=/usr/include/x86_64-linux-gnu/tiffconf.h
++# TIFFCONF_H=$(TIFFCONF)libtiff$(D)tiffconf$(TIFFCONFIG_SUFFIX).h
+ 
+ # Define the name of this makefile.
+ LIBTIFF_MAK=$(GLSRC)tiff.mak $(TOP_MAKEFILES)
+--- a/base/lcups.mak
 b/base/lcups.mak
+@@ -23,7 +23,8 @@
+ # LCUPS_LIBS  - if SHARE_CUPS=1, the link options for the shared library
+ 
+ # (Rename directories.)
+-LIBCUPSSRC=$(LCUPSSRCDIR)$(D)libs$(D)cups$(D)
++# LIBCUPSSRC=$(LCUPSSRCDIR)$(D)libs$(D)cups$(D)
++LIBCUPSSRC=/usr/include/$(D)cups$(D)
+ LIBCUPSGEN=$(LCUPSGENDIR)$(D)
+ LIBCUPSOBJ=$(LCUPSOBJDIR)$(D)
+ LCUPSO_=$(O_)$(LIBCUPSOBJ)
+--- a/base/lcupsi.mak
 

Re: Ghostscript 9.18 packaging

2016-02-11 Thread Jonas Smedegaard
Quoting Damian Dimmich (2016-02-11 13:56:17)
> Yes - hit the wrong button - meant to write to the list.
> 
> So, following your advice I've added the variable in - this gets us 
> much of the way there, although still fails to build cups., and with 
> cups disabled, uses the wrong -llib_openjpeg which should be 
> -lopenjpeg in the .tr files, which I think are generated, so my patch 
> to these is a bit worthless as the changes get overwritten during 
> clean/build.
> 
> I've tried fiddling with one of the older patches to get that to 
> change but to no avail.
> 
> I'm officially stuck at the moment - might try and have another stab 
> at this next week!
> 
> Have attached a patch of where I have gotten to though.

I tried hack on it too a moment ago - will look into your patch and see 
where if I can get any further...


> Thank you for all the help to date,

Really excited about your helping out here - hope you are here to stay! 
:-)

 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private


signature.asc
Description: signature


Re: Ghostscript 9.18 packaging

2016-02-11 Thread Damian Dimmich
Really excited about your helping out here - hope you are here to stay! 
:-) - Jonas




I'll probably be around as work requires it - we process thousands of 
pdf's a week (sometimes 4-5k/day) so I need this to work !! :)


D



Re: Ghostscript 9.18 packaging

2016-02-10 Thread Jonas Smedegaard
[replying via public list, assuming simple error]

Quoting Damian Dimmich (2016-02-10 11:43:38)
> Update regarding the issue - in base/tiff.mak $(TIFFCONFIG_H) and 
> $(TIFFCONF_H) are both incorrectly configured and point to 
> /libtiff/tiff_config.h and /libtiff/tiffconfig.h respectively (neither 
> of which exist).
> 
> As far as I can tell, both of these should be pointing to 
> /usr/include/x86_64-linux-gnu/tiffconf.h - I believe these are 
> synonymous.

Ahh - then I almost had it nailed few days ago - but failed at grep'ing 
too narrowly for "config" among libtiff5-dev filenames :-P


  That conf file predates a configure-compatible macro 
> for tiff and is just used by 'legacy' applications,
> of which I am guessing GS is one of.
> 
> The probably "correct", long-term fix, would be to get GS to use the 
> libtiff make macro.

If trying to get that straightened out, it seems there is alother bug in 
configure.ac setting LIBTIFFCONFDIR (not TIFFCONFDIR).


> In the short term I was able to get GS to build by replacing the 
> incorrect variables to point to /usr/include/x86_64-linux-gnu/tiffconf.h
> 
> Clearly, this isn't a good solution, as its nowhere near cross platform.
> 
> That said, I'm not quite sure how to proceed as there is no tiff-config 
> command.

Maybe if we can get TIFFCONFIG_H overrided at build time, using 
/usr/lib/$(DEB_HOST_MULTIARCH) <- that variable is available to us at 
build time.


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private


signature.asc
Description: signature


Re: Ghostscript 9.18 packaging

2016-02-09 Thread Damian Dimmich

Hi Jonas,

Thanks for the help again - have now been able to reproduce your tiff 
issue.  Progress :)


Will have a stab at getting something working tomorrow!

Damian

On 09/02/2016 22:25, Jonas Smedegaard wrote:

Hi Damian,

Did you subscribe to debian-printing@lists.debian.org yet?

Quoting Damian Dimmich (2016-02-09 18:53:42)

I'm actually stuck a bit earlier on in the process - running $
fakeroot debian/rules build hangs.

I recommend that you use the wrapper command "debuild" instead, to
ensure basic stuff like cleaning before building...

If that doesn't help, then make sure you build in a clean sid
environment - one way to do so is to install cowbuilder, clone my
git://source.jones.dk/bin and put it in your $PATH, and run these:

   localcowbuilder-create sid
   localgitcowdebuild sid


Hope that helps.

NB! Did you subscribe to debian-printing@lists.debian.org yet?


  - Jonas





Re: Ghostscript 9.18 packaging

2016-02-09 Thread Jonas Smedegaard
Quoting Damian Dimmich (2016-02-09 21:04:59)
> Thanks for the help again - have now been able to reproduce your tiff 
> issue.  Progress :)
> 
> Will have a stab at getting something working tomorrow!

Great!

Regarding build environment: You might also consider these:

eatmydata
ccache (and ccontrol)
approx (or apt-cacher-ng)

 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private


signature.asc
Description: signature


Ghostscript 9.18 packaging

2016-02-09 Thread Damian Dimmich

Hello!

I've encountered an issue with GS 9.16 where it fails to render some of 
my customers pdf's correctly into PNG's.


9.18 seems to resolve the issue.  I saw on the Ghostscript package 
tracker that there was already a note to suggest packaging the new 
version.  Is someone already working on this?


If not, I'd be happy to have a stab at it.  I've got _some_ packaging 
experience, although the last time I built a deb was probably around 2006 :)


Just wanted to check if someone was already doing this or not. Would 
love to contribute.


Best regards,

Damian



Re: Ghostscript 9.18 packaging

2016-02-09 Thread Jonas Smedegaard
Hi Damian,

Quoting Damian Dimmich (2016-02-09 08:36:29)
> I've encountered an issue with GS 9.16 where it fails to render some 
> of my customers pdf's correctly into PNG's.
> 
> 9.18 seems to resolve the issue.  I saw on the Ghostscript package 
> tracker that there was already a note to suggest packaging the new 
> version.  Is someone already working on this?
> 
> If not, I'd be happy to have a stab at it.  I've got _some_ packaging 
> experience, although the last time I built a deb was probably around 
> 2006 :)
> 
> Just wanted to check if someone was already doing this or not. Would 
> love to contribute.

Help would be much appreciated!

I have a bad habit of doing far too big chunks of work offline, and have 
now pushed my preliminary attempt at packaging 9.18: It fails to build, 
apparently due to some libtiff linkage not properly handling the use of 
shared libraries which I am enforcing by stripping the convenience code 
copies upstream used to ship.

You are more than welcome to try help figure out how to patch the build 
routines to work - and also to check if you can spot other details I 
have missed in my preparations.

If interested, add your name as uploader in debian/control¹ :-)

Also, please subscribe to our mailinglist if you haven't already, so I 
can drop you as cc in this conversation :-)

 - Jonas


¹ Either edit debian/control directly and leave it to me or others to 
update CDBS files, or - if you are fine working with CDBS - edit the 
debian/control.in.in file and refresh with DEB_MAINTAINER_MODE=1.  See 
debian/README.source for more details.

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private


signature.asc
Description: signature


Re: Ghostscript 9.18 packaging

2016-02-09 Thread Damian Dimmich

Hi Jonas!

Thank you so much!  Have pulled your latest changes.

I'm actually stuck a bit earlier on in the process - running $ fakeroot 
debian/rules build hangs.


cp ./soobj/sjbig2_jbig2dec.dev ./soobj/sjbig2.dev
make[3]: *** No rule to make target 'soobj/sjpx_.dev', needed by 
'soobj/sjpx.dev'.  Stop.

make[3]: Leaving directory '/home/ddimmich/ghostscript'
base/unix-dll.mak:149: recipe for target 'so-only-subtarget' failed
make[2]: *** [so-only-subtarget] Error 2
make[2]: Leaving directory '/home/ddimmich/ghostscript'
base/unix-dll.mak:122: recipe for target 'so' failed
make[1]: *** [so] Error 2
make[1]: Leaving directory '/home/ddimmich/ghostscript'
/usr/share/cdbs/1/class/makefile.mk:47: recipe for target 
'debian/stamp-makefile-build' failed

make: *** [debian/stamp-makefile-build] Error 2

Any idea what I'm missing?

Will keep at it!

Thanks,

Damian

On 09/02/2016 21:10, Jonas Smedegaard wrote:

Hi Damian,

Quoting Damian Dimmich (2016-02-09 08:36:29)

I've encountered an issue with GS 9.16 where it fails to render some
of my customers pdf's correctly into PNG's.

9.18 seems to resolve the issue.  I saw on the Ghostscript package
tracker that there was already a note to suggest packaging the new
version.  Is someone already working on this?

If not, I'd be happy to have a stab at it.  I've got _some_ packaging
experience, although the last time I built a deb was probably around
2006 :)

Just wanted to check if someone was already doing this or not. Would
love to contribute.

Help would be much appreciated!

I have a bad habit of doing far too big chunks of work offline, and have
now pushed my preliminary attempt at packaging 9.18: It fails to build,
apparently due to some libtiff linkage not properly handling the use of
shared libraries which I am enforcing by stripping the convenience code
copies upstream used to ship.

You are more than welcome to try help figure out how to patch the build
routines to work - and also to check if you can spot other details I
have missed in my preparations.

If interested, add your name as uploader in debian/control¹ :-)

Also, please subscribe to our mailinglist if you haven't already, so I
can drop you as cc in this conversation :-)

  - Jonas


¹ Either edit debian/control directly and leave it to me or others to
update CDBS files, or - if you are fine working with CDBS - edit the
debian/control.in.in file and refresh with DEB_MAINTAINER_MODE=1.  See
debian/README.source for more details.





Re: Ghostscript 9.18 packaging

2016-02-09 Thread Jonas Smedegaard
Hi Damian,

Did you subscribe to debian-printing@lists.debian.org yet?

Quoting Damian Dimmich (2016-02-09 18:53:42)
> I'm actually stuck a bit earlier on in the process - running $ 
> fakeroot debian/rules build hangs.

I recommend that you use the wrapper command "debuild" instead, to 
ensure basic stuff like cleaning before building...

If that doesn't help, then make sure you build in a clean sid 
environment - one way to do so is to install cowbuilder, clone my 
git://source.jones.dk/bin and put it in your $PATH, and run these:

  localcowbuilder-create sid
  localgitcowdebuild sid


Hope that helps.

NB! Did you subscribe to debian-printing@lists.debian.org yet?


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private


signature.asc
Description: signature