On Sunday 06 June 2010, Anthony J. Bentley wrote:
> 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.

Hi and sorry for the delay in replying.


> 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/fetche
> rs/fet ch_curl.c:161: undefined reference to `curl_multi_init'
> build-OpenBSD-gtk/content_fetchers_fetch_curl.o(.text+0x3a):content/fetcher
> s/fet ch_curl.c:168: undefined reference to `curl_easy_init'
> build-OpenBSD-gtk/content_fetchers_fetch_curl.o(.text+0x64):content/fetcher
> s/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.

The only thing I can think of is that the linker is getting the OpenSSL 
symbols via libcurl, which dynamically links with OpenSSL.

The reason the undefined symbols above are from libcurl is because the 
Makefile does one pkg-config call for several libraries, which is the one that 
failed when openssl.pc was not there.

 
> 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.)

I think getting rid of -v is no problem. As for install, does anyone else know 
more about it?


> 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?

Ok with me.


> 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)

Looks good. PDF and Sprite certainly aren't essential.


> 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.

I'm not sure why it's using dot, because the config file build/Doxyfile has 
the line "HAVE_DOT = NO".


> 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

I'll commit the patches for (2) and (3) unless anyone has other comments?

Thanks for your contributions!

James


-- 
James Bursa, NetSurf developer                http://www.netsurf-browser.org/

Reply via email to