1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-02-02 11:09:29 +00:00

Support CC/CFLAGS properly.

PR:		ports/22990
Submitted by:	KATO Tsuguru <tkato@prontomail.ne.jp>
This commit is contained in:
SADA Kenji 2000-11-22 16:09:07 +00:00
parent 171bd906f0
commit a2a071eeb7
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=35345
8 changed files with 125 additions and 47 deletions

View File

@ -21,9 +21,9 @@ MAN1= xxgdb.1
# we have the cookie anyway and it's much easier this way
# than modifying the Imakefile.
post-build:
cd ${WRKSRC}; gcc -o xxgdbiowin -O2 xxgdbiowin.c
cd ${WRKSRC} && ${CC} ${CFLAGS} -o xxgdbiowin xxgdbiowin.c
post-install:
install -c -s ${WRKSRC}/xxgdbiowin ${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/xxgdbiowin ${PREFIX}/bin
.include <bsd.port.mk>

View File

@ -1,45 +0,0 @@
--- ./global.h.org Tue Nov 15 18:09:55 1994
+++ ./global.h Tue May 2 21:56:19 1995
@@ -68,7 +68,7 @@
#define alloca __builtin_alloca
#endif
-#ifndef __alpha
+#if !defined(__alpha) && !defined(__FreeBSD__)
#ifndef MAXPATHLEN
#define MAXPATHLEN 1024
#endif
--- ./calldbx.c.org Mon Dec 5 17:21:36 1994
+++ ./calldbx.c Tue May 2 22:06:38 1995
@@ -137,13 +137,17 @@
#ifndef sco
for (c='p'; c<'t'; c++) {
+#ifdef __FreeBSD__
+ for (i=0; i<32; i++) {
+#else
for (i=0; i<16; i++) {
+#endif
#else
c = 'p';
for (i=0; i<8; i++) {
#endif
pty[8] = c;
- pty[9] = "0123456789abcdef"[i];
+ pty[9] = "0123456789abcdefghijklmnopqrstuv"[i];
if ((master = open(pty, O_RDWR)) >= 0)
return (master);
}
--- ./Imakefile.org Thu Mar 23 14:49:32 1995
+++ ./Imakefile Tue May 2 22:14:58 1995
@@ -50,6 +50,10 @@
DEFINES = -DSYSV $(DEFGDB)
#endif
+#ifdef FreeBSDArchitecture
+DEFINES = $(DEFGDB)
+#endif
+
mallocc = #malloc.c
malloco = #malloc.o

View File

@ -0,0 +1,13 @@
--- Imakefile.orig Tue Jun 20 07:20:55 1995
+++ Imakefile Fri Nov 17 21:27:09 2000
@@ -79,6 +79,10 @@
# Add to open all windows at startup
#DEFINES+=-DOPEN_ALL_WINDOWS
+#ifdef FreeBSDArchitecture
+DEFINES = $(DEFGDB)
+#endif
+
mallocc = #malloc.c
malloco = #malloc.o

View File

@ -0,0 +1,21 @@
--- calldbx.c.orig Tue Jun 20 07:11:00 1995
+++ calldbx.c Fri Nov 17 21:27:09 2000
@@ -137,13 +137,17 @@
#ifndef sco
for (c='p'; c<'t'; c++) {
+#ifdef __FreeBSD__
+ for (i=0; i<32; i++) {
+#else
for (i=0; i<16; i++) {
+#endif
#else
c = 'p';
for (i=0; i<8; i++) {
#endif
pty[8] = c;
- pty[9] = "0123456789abcdef"[i];
+ pty[9] = "0123456789abcdefghijklmnopqrstuv"[i];
if ((master = open(pty, O_RDWR)) >= 0)
return (master);
}

View File

@ -0,0 +1,56 @@
--- filemenu.c.orig Tue Aug 30 04:38:28 1994
+++ filemenu.c Fri Nov 17 22:05:05 2000
@@ -95,7 +95,7 @@
#endif
#endif /* _POSIX_SOURCE */
#else /* SYSV */
-#ifdef SUNOS4
+#if defined(SUNOS4) || defined(__FreeBSD__)
#include <dirent.h>
#else
#include <sys/dir.h>
@@ -185,7 +185,7 @@
* text files
* executable files
*/
-#ifndef SYSV
+#if !defined(SYSV) && !defined(__FreeBSD__)
static int InList(entry)
Directory *entry;
{
@@ -228,7 +228,7 @@
static void ScanDir(dir)
char *dir;
{
-#ifndef SYSV
+#if !defined(SYSV) && !defined(__FreeBSD__)
extern alphasort();
Directory **namelist;
#else
@@ -238,7 +238,7 @@
#endif
register int i,j;
-#ifdef SYSV
+#if defined(SYSV) || defined(__FreeBSD__)
if(!(WorkingDir = opendir(dir)))
{
UpdateMessageWindow("scandir: cannot open %s", dir);
@@ -262,7 +262,7 @@
filelist = (char **) XtMalloc((nfiles+1) * sizeof(char *));
i = 0;
for (j=0; j<nfiles; j++) {
-#ifdef SYSV
+#if defined(SYSV) || defined(__FreeBSD__)
WorkingDirEntry = readdir(WorkingDir);
if(!strcmp(WorkingDirEntry->d_name, "."))
strcpy(store, "./");
@@ -305,7 +305,7 @@
}
filelist[i++] = NULL;
-#ifdef SYSV
+#if defined(SYSV) || defined(__FreeBSD__)
closedir(WorkingDir);
#else
XtFree((XtPointer) namelist);

View File

@ -0,0 +1,11 @@
--- global.h.orig Fri Apr 7 01:23:42 1995
+++ global.h Fri Nov 17 21:27:09 2000
@@ -70,7 +70,7 @@
#define alloca __builtin_alloca
#endif
-#ifndef __alpha
+#if !defined(__alpha) && !defined(__FreeBSD__)
#ifndef MAXPATHLEN
#define MAXPATHLEN 1024
#endif

View File

@ -0,0 +1,11 @@
--- regex.c.orig Thu Apr 20 01:58:00 1995
+++ regex.c Fri Nov 17 21:37:49 2000
@@ -114,7 +114,7 @@
* Date : July 27, 1990
*/
-#ifndef NeXT
+#if !defined(NeXT) && !defined(__FreeBSD__)
#include <malloc.h>
#endif
#include <string.h>

View File

@ -0,0 +1,11 @@
--- source.c.orig Sat Apr 22 01:16:02 1995
+++ source.c Fri Nov 17 21:38:58 2000
@@ -74,7 +74,7 @@
* LoadFile(): Search for a file and open it for display.
*/
-#ifndef NeXT
+#if !defined(NeXT) && !defined(__FreeBSD__)
#include <malloc.h>
#endif
#include <stdlib.h>