Hi,

On Thu, Jan 10, 2019 at 12:15:50PM -0500, George Koehler wrote:
> > But it's obviously ugly and wrong (hard coded /usr/X11R6). I'm not
> > very familiar with cmake, so if anyone could help a little bit
> > (passing -L ${X11BASE}lib via CONFIGURE_ARGS to the invocation of
> > g-ir-scanner), I'd be really happy.

[...]

> The next diff (on top of your 0.73.0 update, and with
> qt5/poppler-version.h moved to PLIST-qt5) builds a package on amd64
> using `make package USE_LLD=No`.  This wraps ld.bfd in
> /usr/ports/pobj/poppler-0.73.0-no_qt5-bootstrap/bin/ld
> 
> --- Makefile.orig     Thu Jan 10 11:05:42 2019
> +++ Makefile  Thu Jan 10 11:06:15 2019
> @@ -105,6 +105,7 @@
>               -DBUILD_GTK_TESTS=False \
>               -DENABLE_LIBCURL=False \
>               -DCMAKE_DISABLE_FIND_PACKAGE_NSS3=True \
> -             -DOpenJPEG_DIR=${LOCALBASE}/lib/openjp2
> +             -DOpenJPEG_DIR=${LOCALBASE}/lib/openjp2 \
> +             -DX11BASE=${X11BASE}
>  
>  .include <bsd.port.mk>
> --- /dev/null Thu Jan 10 11:17:48 2019
> +++ patches/patch-glib_CMakeLists_txt Thu Jan 10 11:11:17 2019
> @@ -0,0 +1,16 @@
> +$OpenBSD$
> +
> +Index: glib/CMakeLists.txt
> +--- glib/CMakeLists.txt.orig
> ++++ glib/CMakeLists.txt
> +@@ -130,7 +130,9 @@ if (HAVE_INTROSPECTION AND BUILD_SHARED_LIBS)
> +   set(Poppler_0_18_gir_INCLUDES GObject-2.0 Gio-2.0 cairo-1.0)
> +   get_directory_property(_tmp_includes INCLUDE_DIRECTORIES)
> +   _list_prefix(_includes _tmp_includes "-I")
> +-  set(Poppler_0_18_gir_CFLAGS ${_includes} -L${CMAKE_BINARY_DIR} 
> -L${CMAKE_CURRENT_BINARY_DIR})
> ++  set(Poppler_0_18_gir_CFLAGS ${_includes} -L${CMAKE_BINARY_DIR} 
> -L${CMAKE_CURRENT_BINARY_DIR}
> ++    -L${X11BASE}/lib
> ++  )
> +   set(Poppler_0_18_gir_LIBS poppler-glib)
> +   _list_prefix(_abs_introspection_files introspection_files 
> "${CMAKE_CURRENT_SOURCE_DIR}/")
> +   list(APPEND _abs_introspection_files

Thanks! I'll try this after fixing some fallout caused (again!) by
the poppler update (libreoffice, gimp, pdf2djvu, apvlv).

> There are a few different ways to get the value of X11BASE into
> cmake.  I did cmake -DX11BASE=${X11BASE} which sets X11BASE in
> CMake's cache, but no existing port does this.

If it works, it's ok for now. When I find some time to learn more
about cmake (which I'll have to do anyways), I can try to find some
better way that could also accepted upstream.

Ciao,
        Kili

Reply via email to