On 2018/12/18 05:20, Jan Klemkow wrote:
> On Mon, Dec 17, 2018 at 09:17:41PM +0100, Jan Klemkow wrote:
> > The following diff updates devel/libowfat to version 0.32.  I hat to fix
> > some other build issues this time.  I already sent a patch to upstream.
> > Upstream moved the headers to subdirectory libowfat instead of lowfat.
> > Thus, I adapted that for the port, too.
>
> Removed a useless comment from Makefile.

Build fails for me (amd64 -current):

cc -c io/iom_wait.c -fpic -O2 -pipe   -W -Wall  -D_REENTRANT -O2 -I.
io/iom_wait.c:68:34: warning: incompatible pointer types passing 'struct kevent 
(*)[128]' to parameter of type 'struct
 kevent *' [-Wincompatible-pointer-types]
      int r=kevent(c->ctx, 0, 0, &kev, freeslots, &ts);
                                 ^~~~
/usr/include/sys/event.h:203:22: note: passing argument to parameter 
'eventlist' here
                    struct kevent *eventlist, int nevents,
                                   ^
io/iom_wait.c:79:12: error: use of undeclared identifier 'i'
      for (i=0; i<r; ++i) {
           ^
io/iom_wait.c:79:17: error: use of undeclared identifier 'i'
      for (i=0; i<r; ++i) {
                ^
io/iom_wait.c:79:24: error: use of undeclared identifier 'i'
      for (i=0; i<r; ++i) {
                       ^
io/iom_wait.c:81:15: error: use of undeclared identifier 'i'
        int e = (kev[i].filter == EVFILT_READ ? IOM_READ : 0) |
                     ^
io/iom_wait.c:82:15: error: use of undeclared identifier 'i'
                (kev[i].filter == EVFILT_WRITE ? IOM_WRITE : 0);
                     ^
io/iom_wait.c:83:6: error: use of undeclared identifier 'i'
        if (i+1==r) {
            ^
io/iom_wait.c:85:10: error: member reference base type 'struct kevent [128]' is 
not a structure or union
          *s=kev.ident;
             ~~~^~~~~~
io/iom_wait.c:88:22: error: use of undeclared identifier 'i'
          c->q[c->h].fd=kev[i].ident;
                            ^
1 warning and 8 errors generated.
gmake: *** [GNUmakefile:185: iom_wait.o] Error 1
*** Error 2 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2804 
'/usr/obj/ports/libowfat-0.32/.build_done')
*** Error 1 in /usr/ports/devel/libowfat 
(/usr/ports/infrastructure/mk/bsd.port.mk:2472 'fake')


Also I noticed that the CFLAGS handling is wrong (upstream's -O2 and
-O3 flags are still used and are at the end of the line, overriding
whatever is setup in ports) also the port Makefile is in quite a
different order compared to the standard Makefile.template which
is annoying when we're doing whole-ports-tree work. Here's a diff
to the current in-tree version to clean that up - I'd prefer to
handle this separate from the update - OK? (to save you merging,
I've attached an updated libowfat-0.32 Makefile based on this
as well).

Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/libowfat/Makefile,v
retrieving revision 1.7
diff -u -p -r1.7 Makefile
--- Makefile    17 May 2018 09:53:02 -0000      1.7
+++ Makefile    18 Dec 2018 09:50:56 -0000
@@ -3,31 +3,37 @@
 COMMENT =      library of general purpose APIs
 BROKEN-hppa =  missing atomic ops
 
-SO_VERSION =   0.0
-SHARED_LIBS += owfat ${SO_VERSION}
-
 DISTNAME =     libowfat-0.31
-REVISION =     1
-CATEGORIES =   devel
+EXTRACT_SUFX = .tar.xz
+REVISION =     2
 
-MAINTAINER =   Jan Klemkow <j.klem...@wemelug.de>
+SHARED_LIBS=   owfat 0.0
 
-HOMEPAGE =     http://www.fefe.de/libowfat/
-MASTER_SITES = http://www.fefe.de/libowfat/
-EXTRACT_SUFX = .tar.xz
-USE_GMAKE =    Yes
-MAKE_FILE =    GNUmakefile
+CATEGORIES=    devel
 
-MAKE_FLAGS =   CC="${CC}" COPTFLAGS="-fpic ${CFLAGS}" \
-               SO_VERSION="${SO_VERSION}"
-FAKE_FLAGS =   prefix=${PREFIX} \
-               INCLUDEDIR=${PREFIX}/include/lowfat \
-               MAN3DIR=${PREFIX}/share/lowfat/man/man3
+HOMEPAGE=      https://www.fefe.de/libowfat/
+
+MAINTAINER=    Jan Klemkow <j.klem...@wemelug.de>
 
 # GPLv2 only
 PERMIT_PACKAGE_CDROM = Yes
 
 WANTLIB =      c pthread
+
+MASTER_SITES = https://www.fefe.de/libowfat/
+
+MAKE_FLAGS =   CC="${CC}" \
+               OPT_REG="${CFLAGS}" OPT_PLUS="${CFLAGS}" \
+               SO_VERSION="${LIBowfat_VERSION}"
+FAKE_FLAGS =   prefix=${PREFIX} \
+               INCLUDEDIR=${PREFIX}/include/lowfat \
+               MAN3DIR=${PREFIX}/share/lowfat/man/man3
+
+USE_GMAKE =    Yes
+
 NO_TEST =      Yes
+
+CFLAGS +=      -fpic
+MAKE_FILE=     GNUmakefile
 
 .include <bsd.port.mk>
Index: patches/patch-GNUmakefile
===================================================================
RCS file: /cvs/ports/devel/libowfat/patches/patch-GNUmakefile,v
retrieving revision 1.5
diff -u -p -r1.5 patch-GNUmakefile
--- patches/patch-GNUmakefile   9 Oct 2016 21:25:27 -0000       1.5
+++ patches/patch-GNUmakefile   18 Dec 2018 09:50:56 -0000
@@ -18,17 +18,6 @@ $OpenBSD: patch-GNUmakefile,v 1.5 2016/1
  
  # Use the second version if you are building for a binary that is only
  # supposed to run on this machine. It tells gcc to use CPU instructions
-@@ -33,8 +33,8 @@ OPT_PLUS=-O3 $(NATIVE)
- 
- DEFINE=-D_REENTRANT
- 
--CFLAGS=-pipe $(WARN) $(DEFINE) $(OPT_REG)
--CFLAGS_OPT=-pipe $(WARN) $(DEFINE) $(OPT_PLUS)
-+CFLAGS=$(COPTFLAGS) $(WARN) $(DEFINE) $(OPT_REG)
-+CFLAGS_OPT=$(COPTFLAGS) $(WARN) $(DEFINE) $(OPT_PLUS)
- 
- #CFLAGS=-pipe -Os -march=pentiumpro -mcpu=pentiumpro -fomit-frame-pointer 
-fschedule-insns2 -Wall
- 
 @@ -169,6 +169,9 @@ libowfat.a: $(ALL_OBJS)
        $(CROSS)ar cru $@ $(ALL_OBJS)
        -$(CROSS)ranlib $@




# $OpenBSD: Makefile,v 1.7 2018/05/17 09:53:02 espie Exp $

COMMENT =       library of general purpose APIs
BROKEN-hppa =   missing atomic ops

DISTNAME =      libowfat-0.32
EXTRACT_SUFX =  .tar.xz

SHARED_LIBS=    owfat 0.1

CATEGORIES=     devel

HOMEPAGE=       https://www.fefe.de/libowfat/

MAINTAINER=     Jan Klemkow <j.klem...@wemelug.de>

# GPLv2 only
PERMIT_PACKAGE_CDROM =  Yes

WANTLIB =       c pthread

MASTER_SITES =  https://www.fefe.de/libowfat/

MAKE_FLAGS =    CC="${CC}" \
                OPT_REG="${CFLAGS}" OPT_PLUS="${CFLAGS}" \
                SO_VERSION="${LIBowfat_VERSION}"
FAKE_FLAGS =    prefix=${PREFIX} \
                INCLUDEDIR=${PREFIX}/include \
                MAN3DIR=${PREFIX}/share/libowfat/man/man3

USE_GMAKE =     Yes

NO_TEST =       Yes

CFLAGS +=       -fpic
MAKE_FILE=      GNUmakefile

.include <bsd.port.mk>

Reply via email to