tech-pkg archive

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

Building libfetch and fetch in-tree



                        Hi pkgsrc developers,

I have patches allowing to build both libfetch and fetch directly from
their respective files/ sub-directory within pkgsrc, with simply "make"
for libfetch and the usual "./configure && make" for fetch. I believe
they both keep building normally from within pkgsrc; I have only tested
on NetBSD 6 (amd64) so far though.

The changes can be found there:
http://git.edgebsd.org/gitweb/?p=edgebsd-pkgsrc.git;a=commit;h=a68d57a245bf08991f5d161ada2241e539eb15b4
http://git.edgebsd.org/gitweb/?p=edgebsd-pkgsrc.git;a=commit;h=071c3b76b0624717a11b5470d123e90582a25c4a
http://git.edgebsd.org/gitweb/?p=edgebsd-pkgsrc.git;a=commit;h=9fd74a45283efbc0ded586a1fb37717f9a04e935
http://git.edgebsd.org/gitweb/?p=edgebsd-pkgsrc.git;a=commit;h=49b16b1e7891deefc7e701f84d3a25a15a1045b5
http://git.edgebsd.org/gitweb/?p=edgebsd-pkgsrc.git;a=commit;h=538de2308a5543a00df78316d6ce59eb8d08a24e

In more details, I have added a check for the presence of nbcompat.h in
the configure script (for fetch), and then protected its inclusion with
the HAVE_NBCOMPAT_H macro.

I am attaching a complete diff here anyway; please let me know if/when I
could commit part or all of these changes.

HTH,
-- 
khorben
diff --git a/net/fetch/files/config.h.in b/net/fetch/files/config.h.in
index 00fd491..53f4203 100644
--- a/net/fetch/files/config.h.in
+++ b/net/fetch/files/config.h.in
@@ -15,18 +15,30 @@
 /* Define to 1 if you have the <inttypes.h> header file. */
 #undef HAVE_INTTYPES_H
 
+/* Define to 1 if you have the `crypto' library (-lcrypto). */
+#undef HAVE_LIBCRYPTO
+
+/* Define to 1 if you have the `fetch' library (-lfetch). */
+#undef HAVE_LIBFETCH
+
 /* Define to 1 if you have the `nsl' library (-lnsl). */
 #undef HAVE_LIBNSL
 
 /* Define to 1 if you have the `socket' library (-lsocket). */
 #undef HAVE_LIBSOCKET
 
+/* Define to 1 if you have the `ssl' library (-lssl). */
+#undef HAVE_LIBSSL
+
 /* Define to 1 if the system has the type `long long int'. */
 #undef HAVE_LONG_LONG_INT
 
 /* Define to 1 if you have the <memory.h> header file. */
 #undef HAVE_MEMORY_H
 
+/* Define to 1 if you have the <nbcompat.h> header file. */
+#undef HAVE_NBCOMPAT_H
+
 /* Define to 1 if you have the `setproctitle' function. */
 #undef HAVE_SETPROCTITLE
 
@@ -69,6 +81,9 @@
 /* Define to 1 if you have the <unistd.h> header file. */
 #undef HAVE_UNISTD_H
 
+/* Define to 1 if the system has the type `unsigned long long int'. */
+#undef HAVE_UNSIGNED_LONG_LONG_INT
+
 /* Define to the address where bug reports for this package should be sent. */
 #undef PACKAGE_BUGREPORT
 
diff --git a/net/fetch/files/configure b/net/fetch/files/configure
index 4966267..33b6d1f 100755
--- a/net/fetch/files/configure
+++ b/net/fetch/files/configure
@@ -3424,7 +3424,7 @@ fi
 
 done
 
-for ac_header in err.h stdint.h termios.h sysexists.h
+for ac_header in err.h stdint.h termios.h sysexists.h nbcompat.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" 
"$ac_includes_default"
diff --git a/net/fetch/files/configure.ac b/net/fetch/files/configure.ac
index ba2d7b5..e4b4023 100644
--- a/net/fetch/files/configure.ac
+++ b/net/fetch/files/configure.ac
@@ -8,7 +8,7 @@ AC_CONFIG_HEADER(config.h)
 AC_CANONICAL_HOST
 
 AC_CHECK_HEADERS([sys/param.h sys/ioctl.h sys/socket.h sys/stat.h sys/time.h])
-AC_CHECK_HEADERS([err.h stdint.h termios.h sysexists.h])
+AC_CHECK_HEADERS([err.h stdint.h termios.h sysexists.h nbcompat.h])
 
 AC_TYPE_INTMAX_T
 
diff --git a/net/fetch/files/fetch.c b/net/fetch/files/fetch.c
index cba7c88..fc54377 100644
--- a/net/fetch/files/fetch.c
+++ b/net/fetch/files/fetch.c
@@ -29,7 +29,7 @@
 #if HAVE_CONFIG_H
 #include "config.h"
 #endif
-#ifndef NETBSD
+#if HAVE_NBCOMPAT_H
 #include <nbcompat.h>
 #endif
 
diff --git a/net/libfetch/files/common.c b/net/libfetch/files/common.c
index 48fba41..2382d8d 100644
--- a/net/libfetch/files/common.c
+++ b/net/libfetch/files/common.c
@@ -33,7 +33,7 @@
 #if HAVE_CONFIG_H
 #include "config.h"
 #endif
-#ifndef NETBSD
+#if HAVE_NBCOMPAT_H
 #include <nbcompat.h>
 #endif
 
@@ -47,10 +47,10 @@
 
 #include <ctype.h>
 #include <errno.h>
-#if defined(HAVE_INTTYPES_H) || defined(NETBSD)
+#if defined(HAVE_INTTYPES_H) || defined(__NetBSD__)
 #include <inttypes.h>
 #endif
-#ifndef NETBSD
+#if HAVE_NBCOMPAT_H
 #include <nbcompat/netdb.h>
 #else
 #include <netdb.h>
diff --git a/net/libfetch/files/fetch.c b/net/libfetch/files/fetch.c
index c287097..18fd3e3 100644
--- a/net/libfetch/files/fetch.c
+++ b/net/libfetch/files/fetch.c
@@ -33,7 +33,7 @@
 #if HAVE_CONFIG_H
 #include "config.h"
 #endif
-#ifndef NETBSD
+#if HAVE_NBCOMPAT_H
 #include <nbcompat.h>
 #endif
 
diff --git a/net/libfetch/files/file.c b/net/libfetch/files/file.c
index b092fdf..75f0be4 100644
--- a/net/libfetch/files/file.c
+++ b/net/libfetch/files/file.c
@@ -33,7 +33,7 @@
 #if HAVE_CONFIG_H
 #include "config.h"
 #endif
-#ifndef NETBSD
+#if HAVE_NBCOMPAT_H
 #include <nbcompat.h>
 #endif
 
diff --git a/net/libfetch/files/ftp.c b/net/libfetch/files/ftp.c
index 3eea340..1a4a507 100644
--- a/net/libfetch/files/ftp.c
+++ b/net/libfetch/files/ftp.c
@@ -65,7 +65,7 @@
 #if HAVE_CONFIG_H
 #include "config.h"
 #endif
-#ifndef NETBSD
+#if HAVE_NBCOMPAT_H
 #include <nbcompat.h>
 #endif
 
@@ -78,11 +78,11 @@
 #include <ctype.h>
 #include <errno.h>
 #include <fcntl.h>
-#if defined(HAVE_INTTYPES_H) || defined(NETBSD)
+#if defined(HAVE_INTTYPES_H) || defined(__NetBSD__)
 #include <inttypes.h>
 #endif
 #include <stdarg.h>
-#ifndef NETBSD
+#if HAVE_NBCOMPAT_H
 #include <nbcompat/netdb.h>
 #include <nbcompat/stdio.h>
 #else
diff --git a/net/libfetch/files/http.c b/net/libfetch/files/http.c
index 481abce..dbc5687 100644
--- a/net/libfetch/files/http.c
+++ b/net/libfetch/files/http.c
@@ -78,7 +78,7 @@
 #if HAVE_CONFIG_H
 #include "config.h"
 #endif
-#ifndef NETBSD
+#if HAVE_NBCOMPAT_H
 #include <nbcompat.h>
 #endif
 
@@ -89,7 +89,7 @@
 #include <errno.h>
 #include <locale.h>
 #include <stdarg.h>
-#ifndef NETBSD
+#if HAVE_NBCOMPAT_H
 #include <nbcompat/stdio.h>
 #else
 #include <stdio.h>
@@ -102,7 +102,7 @@
 #include <netinet/in.h>
 #include <netinet/tcp.h>
 
-#ifndef NETBSD
+#if HAVE_NBCOMPAT_H
 #include <nbcompat/netdb.h>
 #else
 #include <netdb.h>


Home | Main Index | Thread Index | Old Index