Ticket #27253: macosx.patch

File macosx.patch, 3.5 KB (added by tlesher@…, 14 years ago)

To apply against https://fedorahosted.org/releases/n/e/newt/ version 0.52.11

  • Makefile.in

    diff -urN newt-0.52.11/Makefile.in newt-0.52.11-macosx/Makefile.in
    old new  
    1 LIBS = -lslang
    2 LIBTCL = -ltcl8.4
     1LIBS = -L/opt/local/lib -lslang
     2LIBTCL = -L/opt/local/lib -ltcl8.4 -lintl
    33
    44CC = @CC@
    55CPP = @CPP@
    66CFLAGS = @CFLAGS@
    7 CPPFLAGS = -D_GNU_SOURCE -I/usr/include/slang @CPPFLAGS@
     7CPPFLAGS = -D_GNU_SOURCE -I/opt/local/include @CPPFLAGS@
    88
    9 SHLIBFLAGS= -Wl,--version-script,newt.0.52.ver
     9SHLIBFLAGS=
    1010VERSION = @VERSION@
    1111TAG = r$(subst .,-,$(VERSION))
    1212SONAME = @SONAME@
    1313
    1414PYTHONVERS = @PYTHONVERS@
    15 WHIPTCLSO = @WHIPTCLSO@
     15WHIPTCLSO = #@WHIPTCLSO@
    1616
    1717PROGS = test whiptail $(WHIPTCLSO) testgrid testtree showchars showkey
    1818TESTOBJS = test.o testgrid.o testtree.o showchars.o showkey.o
     
    5050TARGET=depend $(PROGS)
    5151endif
    5252
    53 all:    $(TARGET) _snackmodule.so
     53all:    $(TARGET) #_snackmodule.so
    5454
    5555test:   test.o $(LIBNEWT)
    5656        $(CC) -g -o test test.o $(LIBNEWT) $(LIBS)
     
    7070_snackmodule.so:   snackmodule.c $(LIBNEWTSH)
    7171        for ver in $(PYTHONVERS) ; do \
    7272                mkdir -p $$ver ;\
    73                 $(CC) $(CFLAGS) -I/usr/include/$$ver $(SHCFLAGS) -c -o $$ver/snackmodule.o snackmodule.c ;\
    74                 $(CC) --shared $(SHCFLAGS) -o $$ver/_snackmodule.so $$ver/snackmodule.o -L .  -lnewt ;\
     73                echo $(CC) $(CFLAGS) -I/usr/include/$$ver $(SHCFLAGS) -c -o $$ver/snackmodule.o snackmodule.c ;\
     74                echo $(CC) --shared $(SHCFLAGS) -o $$ver/_snackmodule.so $$ver/snackmodule.o -L.  -lnewt ;\
    7575        done
    7676        touch $@
    7777
    7878whiptail: $(NDIALOGOBJS) $(LIBNEWTSH)
    79         $(CC) -g -o whiptail $(NDIALOGOBJS) -L . -lnewt $(LIBS) -lpopt
     79        $(CC) -g -o whiptail $(NDIALOGOBJS) -L. -lnewt $(LIBS) -lpopt
    8080
    8181whiptcl.so: $(WHIPTCLOBJS) $(LIBNEWTSH)
    82         $(CC) -shared $(SHCFLAGS) -o whiptcl.so $(WHIPTCLOBJS) -L . -lnewt  $(LIBTCL) -lpopt
     82        $(CC) -shared $(SHCFLAGS) -o whiptcl.so $(WHIPTCLOBJS) -L. -lnewt  $(LIBTCL) -lpopt
    8383
    8484$(LIBNEWT): $(LIBOBJS)
    8585        ar rv $@ $^
     
    119119        install -m 755 whiptail $(instroot)/$(bindir)
    120120        install -m 644 whiptail.1 $(instroot)/$(man1dir)
    121121        make -C po datadir=$(instroot)/$(datadir) install
    122         install -m 644 -D libnewt.pc $(instroot)/$(pkgconfigdir)/libnewt.pc
     122        install -m 644 libnewt.pc $(instroot)/$(pkgconfigdir)/libnewt.pc
    123123
    124 install-sh: sharedlib $(WHIPTCLSO) _snackmodule.so
     124install-sh: sharedlib $(WHIPTCLSO) #_snackmodule.so
    125125        [ -d $(instroot)/$(libdir) ] || install -m 755 -d $(instroot)/$(libdir)
    126126        install -m 755 $(LIBNEWTSH) $(instroot)/$(libdir)
    127127        ln -sf $(LIBNEWTSONAME) $(instroot)/$(libdir)/libnewt.so
     
    129129        [ -n "$(WHIPTCLSO)" ] && install -m 755 whiptcl.so $(instroot)/$(libdir) || :
    130130        for ver in $(PYTHONVERS) ; do \
    131131           [ -d $(instroot)/$(libdir)/$$ver/site-packages ] || install -m 755 -d $(instroot)/$(libdir)/$$ver/site-packages ;\
    132            install -m 755 $$ver/_snackmodule.so $(instroot)/$(libdir)/$$ver/site-packages ;\
    133            install -m 644 snack.py $(instroot)/$(libdir)/$$ver/site-packages ;\
     132           echo install -m 755 $$ver/_snackmodule.so $(instroot)/$(libdir)/$$ver/site-packages ;\
     133           echo install -m 644 snack.py $(instroot)/$(libdir)/$$ver/site-packages ;\
    134134        done
    135135
    136136Makefile: newt.spec
  • whiptail.c

    diff -urN newt-0.52.11/whiptail.c newt-0.52.11-macosx/whiptail.c
    old new  
    88#include <unistd.h>
    99#include <wchar.h>
    1010#include <slang.h>
     11#include <sys/stat.h>
    1112
    1213#include "nls.h"
    1314#include "dialogboxes.h"