about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--GNUmakefile11
-rw-r--r--Makefile.common1
-rw-r--r--buildtools/README.pkg10
-rwxr-xr-xbuildtools/installnetpbm.pl14
-rw-r--r--doc/HISTORY5
-rw-r--r--lib/Makefile6
-rw-r--r--lib/bitio.h4
-rw-r--r--lib/colorname.h2
-rw-r--r--lib/pam.h4
-rw-r--r--lib/pammap.h4
-rw-r--r--lib/pbm.h2
-rw-r--r--lib/pgm.h4
-rw-r--r--lib/pm.h2
-rw-r--r--lib/pm_gamma.h2
-rw-r--r--lib/pnm.h4
-rw-r--r--lib/ppm.h6
16 files changed, 56 insertions, 25 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 84207d5d..fc4bdef1 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -346,11 +346,14 @@ $(PKGDIR)/bin/doc.url: $(PKGDIR)/bin
 install-dev: install.hdr install.staticlib install.lib install.sharedlibstub
 
 .PHONY: install.hdr
-install.hdr: $(PKGDIR)/include
-	$(MAKE) -C lib -f $(SRCDIR)/lib/Makefile \
-	    SRCDIR=$(SRCDIR) BUILDDIR=$(BUILDDIR) install.hdr
+install.hdr: lib/install.hdr $(PKGDIR)/include/netpbm
 	$(INSTALL) -c -m $(INSTALL_PERM_HDR) \
-	    $(BUILDDIR)/pm_config.h $(PKGDIR)/include
+	    $(BUILDDIR)/pm_config.h $(PKGDIR)/include/netpbm
+
+.PHONY: lib/install.hdr
+lib/install.hdr:
+	$(MAKE) -C $(dir $@) -f $(SRCDIR)/lib/Makefile \
+	    SRCDIR=$(SRCDIR) BUILDDIR=$(BUILDDIR) $(notdir $@)
 
 ifeq ($(STATICLIB_TOO),y)
 BUILD_STATIC = y
diff --git a/Makefile.common b/Makefile.common
index 16bb58ef..a4f389bb 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -36,7 +36,6 @@
 # INSTALL: command to use to copy files to where they belong
 # INSTALL_PERM_BIN: file permissions for installed binaries
 # INSTALL_PERM_LIB: ...same for libraries
-# INSTALL_PERM_HDR: ...same for headers
 # INSTALL_PERM_MAN: ...same for man pages
 # MERGE_OBJECTS: list of object files that go into the merged executable
 #   from the current directory (not subdirectories).  All of these are to
diff --git a/buildtools/README.pkg b/buildtools/README.pkg
index b2a6b0ef..e544cbb7 100644
--- a/buildtools/README.pkg
+++ b/buildtools/README.pkg
@@ -69,6 +69,16 @@ The parts to be installed are:
     that is in the default search path of your compiler.  Typical
     directories for this are /usr/include and /usr/local/include.
 
+    All of the files are meant to be named like <netpbm/xxx.h> for C
+    #include purposes, which means on an ordinary system, they are
+    installed in a directory named "netpbm".  Thus, they are organized
+    this way in the package.  BUT: until Netpbm 10.41 (December 2007),
+    they were packaged for, and customarily used, just as <xxx.h>.
+    Therefore, for backward compatibility, it is a good idea to make
+    symbolic links from the parent directory into the netpbm/
+    directory.  But as that may pollute your namespace, you may prefer
+    just to make all users migrate to the <netpbm/xxx.h> form.
+
   Data Files
 
     These are files that you can use for various purposes as input to
diff --git a/buildtools/installnetpbm.pl b/buildtools/installnetpbm.pl
index f6ab7ca0..25376ec3 100755
--- a/buildtools/installnetpbm.pl
+++ b/buildtools/installnetpbm.pl
@@ -554,7 +554,19 @@ sub installHeader($$$) {
               "failed.\n");
         print("cp exit code is $rc\n");
     } else {
-        print("done.\n");
+        # Install symbolic links for backward compatibility (because the
+        # netpbm/ subdirectory wasn't used before Netpbm 10.41 (December
+        # 2007).
+
+        my $rc = system("cd $hdrDir; ln -s netpbm/* .");
+
+        if ($rc != 0) {
+            print("Failed to create backward compatibilty symlinks from " .
+                  "$hdrDir into $hdrDir/netpbm\n");
+            print("ln exit code is $rc\n");
+        } else {
+            print("done.\n");
+        }
     }
     $$includedirR = $hdrDir;
 }
diff --git a/doc/HISTORY b/doc/HISTORY
index 81fa6bee..e91f0960 100644
--- a/doc/HISTORY
+++ b/doc/HISTORY
@@ -15,6 +15,11 @@ not yet  BJH  Release 10.41.00
               pm_freerow(); change row buffer type from char * to void *
               for pm_allocrow(), pm_freerow().
 
+              Fix bug: ppmdraw.h, ppmdfont.h not installed.
+
+              package, install: install interface header files as
+              <netpbm/xxx.h> instead of just <xxx.h>.
+
 07.09.26 BJH  Release 10.40.00
 
               pamfunc: Add -andmask, -ormask, -xormask, -not,
diff --git a/lib/Makefile b/lib/Makefile
index 508cd6a0..c7af819f 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -240,9 +240,11 @@ install.hdr: $(INTERFACE_HEADERS:%=%_installhdr)
 # prefer not to "install" them, but just to access the Netpbm source
 # directory when you compile your programs.
 
-%_installhdr: $(PKGDIR)/include
+.PHONY: $(INTERFACE_HEADERS:%=%_installhdr)
+
+$(INTERFACE_HEADERS:%=%_installhdr): $(PKGDIR)/include/netpbm
 	$(INSTALL) -c -m $(INSTALL_PERM_HDR) \
-	  $(SRCDIR)/lib/$(@:%_installhdr=%) $(PKGDIR)/include/;
+	  $(SRCDIR)/lib/$(@:%_installhdr=%) $(PKGDIR)/include/netpbm/
 
 .PHONY: install.staticlib
 install.staticlib: $(PKGDIR)/link
diff --git a/lib/bitio.h b/lib/bitio.h
index 15fe0e8a..dfc5a153 100644
--- a/lib/bitio.h
+++ b/lib/bitio.h
@@ -32,7 +32,7 @@
 #ifndef _BITIO_H_
 #define _BITIO_H_
 
-#include "pm.h"
+#include <netpbm/pm.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -86,4 +86,4 @@ pm_bitwrite(BITSTREAM     b,
 #ifdef __cplusplus
 }
 #endif
-#endif /* _BITIO_H_ */
+#endif
diff --git a/lib/colorname.h b/lib/colorname.h
index d33980e4..74583144 100644
--- a/lib/colorname.h
+++ b/lib/colorname.h
@@ -3,7 +3,7 @@
 
 #include <string.h>
 #include <stdio.h>
-#include "ppm.h"
+#include <netpbm/ppm.h>
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/lib/pam.h b/lib/pam.h
index 8f9f5d12..c28c5c2c 100644
--- a/lib/pam.h
+++ b/lib/pam.h
@@ -6,8 +6,8 @@
 #ifndef PAM_H
 #define PAM_H
 
-#include "pm.h"
-#include "pnm.h"
+#include <netpbm/pm.h>
+#include <netpbm/pnm.h>
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/lib/pammap.h b/lib/pammap.h
index a53a9c23..c9c1deed 100644
--- a/lib/pammap.h
+++ b/lib/pammap.h
@@ -9,8 +9,8 @@
 
 #ifndef PAMMAP_H
 #define PAMMAP_H
-#include "colorname.h"
-#include "pam.h"
+#include <netpbm/colorname.h>
+#include <netpbm/pam.h>
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/lib/pbm.h b/lib/pbm.h
index 1591c77f..dbe50216 100644
--- a/lib/pbm.h
+++ b/lib/pbm.h
@@ -1,7 +1,7 @@
 #ifndef PBM_H_INCLUDED
 #define PBM_H_INCLUDED
 
-#include "pm.h"
+#include <netpbm/pm.h>
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/lib/pgm.h b/lib/pgm.h
index fd960b5b..2de8d531 100644
--- a/lib/pgm.h
+++ b/lib/pgm.h
@@ -4,8 +4,8 @@
 #ifndef _PGM_H_
 #define _PGM_H_
 
-#include "pm.h"
-#include "pbm.h"
+#include <netpbm/pm.h>
+#include <netpbm/pbm.h>
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/lib/pm.h b/lib/pm.h
index 30f126db..28dfbb43 100644
--- a/lib/pm.h
+++ b/lib/pm.h
@@ -13,7 +13,7 @@
 #ifndef PM_H_INCLUDED
 #define PM_H_INCLUDED
 
-#include "pm_config.h"
+#include <netpbm/pm_config.h>
 
 #include <sys/types.h>
 #include <ctype.h>
diff --git a/lib/pm_gamma.h b/lib/pm_gamma.h
index 92b34145..6630e05c 100644
--- a/lib/pm_gamma.h
+++ b/lib/pm_gamma.h
@@ -1,7 +1,7 @@
 #ifndef _PM_GAMMA_H_
 #define _PM_GAMMA_H_
 
-#include "pm_config.h"
+#include <netpbm/pm_config.h>
 
 #include <math.h>
 
diff --git a/lib/pnm.h b/lib/pnm.h
index 93660d91..636c1336 100644
--- a/lib/pnm.h
+++ b/lib/pnm.h
@@ -4,8 +4,8 @@
 #ifndef _PNM_H_
 #define _PNM_H_
 
-#include "pm.h"
-#include "ppm.h"
+#include <netpbm/pm.h>
+#include <netpbm/ppm.h>
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/lib/ppm.h b/lib/ppm.h
index 190f9aae..604b9cb1 100644
--- a/lib/ppm.h
+++ b/lib/ppm.h
@@ -3,8 +3,8 @@
 #ifndef _PPM_H_
 #define _PPM_H_
 
-#include "pm.h"
-#include "pgm.h"
+#include <netpbm/pm.h>
+#include <netpbm/pgm.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -51,7 +51,7 @@ typedef struct {
 #define PPM_TYPE PPM_FORMAT
 
 
-#include "ppmcmap.h"
+#include <netpbm/ppmcmap.h>
 
 /* Macro for turning a format number into a type number. */