OpenBSD port -- comments appreciated

Anthony J. Bentley anthonyjbentley at gmail.com
Sun Jun 6 06:49:04 BST 2010


Hey guys,

I've made some Netsurf packages that I'd like to get committed to the
OpenBSD ports tree, but I thought I'd ask for feedback here first.

Notes on the port:

1) There was some pkg-config weirdness. OpenBSD doesn't use pkg-config
for base system packages, and OpenSSL is part of the OBSD base. Thus,
"Package openssl was not found in the pkg-config search path" warnings
popped up, and though everything compiled fine, in the end it wouldn't
link:

build-OpenBSD-gtk/content_fetchers_fetch_curl.o(.text+0x18): In function `fetch_
curl_register':
content/fetchers/fetch_curl.c:156: undefined reference to `curl_global_init'
build-OpenBSD-gtk/content_fetchers_fetch_curl.o(.text+0x28):content/fetchers/fet
ch_curl.c:161: undefined reference to `curl_multi_init'
build-OpenBSD-gtk/content_fetchers_fetch_curl.o(.text+0x3a):content/fetchers/fet
ch_curl.c:168: undefined reference to `curl_easy_init'
build-OpenBSD-gtk/content_fetchers_fetch_curl.o(.text+0x64):content/fetchers/fet
ch_curl.c:180: undefined reference to `curl_easy_setopt'
<etc etc>

The strange thing is that if I then make an openssl.pc file, even a blank
one, it links fine. No errors, and the resulting netsurf can still visit
HTTPS sites like GMail.

Because doing the above is probably a bad idea, I patched the makefile
to never run "pkg-config --libs openssl". After that it builds fine
without any openssl.pc, and again, I can still view GMail just fine.


2) The original makefile uses "@cp -vRL" to install files. OpenBSD's
cp doesn't have the -v flag, so this doesn't work. I patched to remove
the -v flag and showed it to IRC a while back:

2010-05-05 00:07 <rjek> Regardless, it's not the right fix anyway :)

2010-05-05 00:02 <rjek> tbh, we should be using install, but I couldn't be
bothered.

So would a better solution be replacing "cp -vRL" for .css, etc files with
"install -c -o root -g bin -m 444" ? (Just a guess here, these are the
flags the ports tree uses for data files.)


3) The ports tree *has* to set PREFIX through environment variables, and
that can't be reasonably done through Makefile.config AFAIK. So I touched
Makefile.defaults (I know, I know):
-PREFIX := /usr/local
+PREFIX ?= /usr/local

Is this okay? What do you think?


4) Makefile.config values:

M.CONFIG: JPEG (libjpeg)        enabled       (NETSURF_USE_JPEG := YES)
M.CONFIG: JNG/MNG/PNG (libmng)  enabled       (NETSURF_USE_MNG := YES)
M.CONFIG: PDF export (haru)     disabled      (NETSURF_USE_HARU_PDF := NO)
M.CONFIG: glibc internal iconv  disabled      (NETSURF_USE_LIBICONV_PLUG := NO)
M.CONFIG: SVG (librsvg-2.0)     enabled       (NETSURF_USE_RSVG := YES)
M.CONFIG: SVG (libsvgtiny)      disabled      (NETSURF_USE_NSSVG := NO)
M.CONFIG: Sprite (librosprite)  disabled      (NETSURF_USE_ROSPRITE := NO)
M.CONFIG: BMP (libnsbmp)        enabled       (NETSURF_USE_BMP := YES)
M.CONFIG: GIF (libnsgif)        enabled       (NETSURF_USE_GIF := YES)
M.CONFIG: PNG   (libpng)        enabled       (NETSURF_USE_PNG := YES)


5) libparserutils and hubbub run "make docs" and copy everything to
/usr/local/share/doc/$whatever/html. Netsurf does not because dot in
OpenBSD is currently broken. This is OpenBSD's problem; I hope to get
it fixed there soon.



So, any comments/criticisms? If my patches are any good I'd like to get
them committed; if they're not, well, I'd like to fix mine ;)
You can get the port files (including patches, in www/netsurf/patches/) at
http://www.unm.edu/~bentley/netsurf-001.tar.gz

Thanks,
--Anthony J. Bentley



More information about the netsurf-dev mailing list