Monday, June 28, 2021

Re: OpenBSD ports: graywolf broken

Index: Makefile
===================================================================
RCS file: /cvs/ports/cad/graywolf/Makefile,v
retrieving revision 1.4
diff -u -p -u -p -r1.4 Makefile
--- Makefile 20 Feb 2021 19:12:04 -0000 1.4
+++ Makefile 28 Jun 2021 11:56:04 -0000
@@ -5,7 +5,7 @@ COMMENT = placement tool used in VLSI de
GH_ACCOUNT = rubund
GH_PROJECT = graywolf
GH_TAGNAME = 0.1.6
-REVISION = 1
+REVISION = 2

SHARED_LIBS += ycadgraywolf 0.0 # 0.0

@@ -14,7 +14,7 @@ CATEGORIES = cad
MAINTAINER = Alessandro De Laurenzis <just22@atlantide.mooo.com>

# GPLv2+
-PERMIT_PACKAGE = Yes
+PERMIT_PACKAGE = Yes

WANTLIB += ICE SM X11 Xext c gsl gslcblas m

@@ -23,7 +23,7 @@ MODULES = devel/cmake
LIB_DEPENDS = devel/gsl

# Really really not C99
-CONFIGURE_ARGS = -DCMAKE_C_FLAGS="${CFLAGS} -Wno-return-type"
+CONFIGURE_ARGS = -DCMAKE_C_FLAGS="${CFLAGS} -Wno-return-type"

NO_TEST = Yes

Index: patches/patch-CMakeLists_txt
===================================================================
RCS file: /cvs/ports/cad/graywolf/patches/patch-CMakeLists_txt,v
retrieving revision 1.1.1.1
diff -u -p -u -p -r1.1.1.1 patch-CMakeLists_txt
--- patches/patch-CMakeLists_txt 28 Aug 2018 18:26:57 -0000 1.1.1.1
+++ patches/patch-CMakeLists_txt 28 Jun 2021 11:56:04 -0000
@@ -3,10 +3,11 @@ $OpenBSD: patch-CMakeLists_txt,v 1.1.1.1
Index: CMakeLists.txt
--- CMakeLists.txt.orig
+++ CMakeLists.txt
-@@ -8,7 +8,10 @@ find_package(X11)
+@@ -8,7 +8,11 @@ find_package(X11)
INCLUDE(CheckIncludeFiles)
include(GNUInstallDirs)

++set(CMAKE_INCLUDE_CURRENT_DIR ON)
+include_directories(${OPENBSD_LOCALBASE}/include)
+link_directories(${OPENBSD_LOCALBASE}/lib)

@@ -14,7 +15,7 @@ Index: CMakeLists.txt
pkg_check_modules(GSL gsl)

if (NOT GSL_FOUND)
-@@ -36,7 +39,6 @@ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in
+@@ -36,7 +40,6 @@ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in


install(DIRECTORY flow DESTINATION lib/graywolf/bin)
Hello Jasper,

There are indeed some header files named "dialog.h" spread into the
source code, causing a clash when /usr/local/include/dialog.h is present.

I'm not an expert of the CMake ecosystem, but from a quick search on the
net, the usual solution to this kind of issues is to explicitly add the
current source and build directories to the include path, by mean of the
CMAKE_INCLUDE_CURRENT_DIR variable.

Please find enclosed a diff with bumped revision and re-based patches
(while there, I also fixed some indentations in the port's Makefile).

Of course, alternative approach suggestions are welcome.

Copying ports@

On 27/06/2021 13:38, Jasper Lievisse Adriaanse wrote:
> Hello,
>
> I noticed that the cad/graywolf port doesn't build when misc/dialog is installed:
>
> [2/159] : && /usr/ports/pobj/graywolf-0.1.6/bin/cc -O2 -pipe -Wno-return-type -DSIZEOF_VOID_P=64 -Wno-implicit-function-declaration -DNDEBUG src/
> date/CMakeFiles/getdate.dir/getdate.c.o -o src/date/getdate -L/usr/local/lib -Wl,-rpath-link,/usr/X11R6/lib:/usr/local/lib && :
> [3/159] /usr/ports/pobj/graywolf-0.1.6/bin/cc -I/usr/local/include -I/usr/ports/pobj/graywolf-0.1.6/graywolf-0.1.6/include -Iinclude -I/usr/ports/pobj/graywolf-0.1.6/graywolf-0.1.6/src/twmc/. -O2 -pipe -Wno-return-type -DSIZEOF_VOID_P=64 -Wno-implicit-function-declaration -DNDEBUG -MD -MT src
> /twmc/CMakeFiles/TimberWolfMC.dir/graphics.c.o -MF src/twmc/CMakeFiles/TimberWolfMC.dir/graphics.c.o.d -o src/twmc/CMakeFiles/TimberWolfMC.dir/graph
> ics.c.o -c /usr/ports/pobj/graywolf-0.1.6/graywolf-0.1.6/src/twmc/graphics.c
> FAILED: src/twmc/CMakeFiles/TimberWolfMC.dir/graphics.c.o
> /usr/ports/pobj/graywolf-0.1.6/bin/cc -I/usr/local/include -I/usr/ports/pobj/graywolf-0.1.6/graywolf-0.1.6/include -Iinclude -I/usr/ports/pobj/gray
> wolf-0.1.6/graywolf-0.1.6/src/twmc/. -O2 -pipe -Wno-return-type -DSIZEOF_VOID_P=64 -Wno-implicit-function-declaration -DNDEBUG -MD -MT src/twmc/CMakeFiles/TimberWolfMC.dir/graphics.c.o -MF src/twmc/CMakeFiles/TimberWolfMC.dir/graphics.c.o.d -o src/twmc/CMakeFiles/TimberWolfMC.dir/graphics.c.o -c /usr/ports/pobj/graywolf-0.1.6/graywolf-0.1.6/src/twmc/graphics.c In file included from /usr/ports/pobj/graywolf-0.1.6/graywolf-0.1.6/src/twmc/graphics.c:137:
> In file included from /usr/local/include/dialog.h:59:
> /usr/include/ncurses.h:1216:32: error: expected identifier or '('
> extern NCURSES_EXPORT_VAR(int) COLORS;
> ^
>
> Could you have a look at this please?
>
> Cheers,
> Jasper
>

--
Alessandro De Laurenzis
[mailto:just22@atlantide.mooo.com]
Web: http://www.atlantide.mooo.com
LinkedIn: http://it.linkedin.com/in/delaurenzis

No comments:

Post a Comment