ports/184226: print/xmbibtex: Fix build with clang

KATO Tsuguru tkato432 at yahoo.com
Sun Nov 24 18:10:02 UTC 2013


>Number:         184226
>Category:       ports
>Synopsis:       print/xmbibtex: Fix build with clang
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Nov 24 18:10:02 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     KATO Tsuguru
>Release:        FreeBSD 8.4-RELEASE-p4 i386
>Organization:
>Environment:
>Description:
- Fix build with clang

New file:
files/patch-print_cb.cc

>How-To-Repeat:
>Fix:

diff -urN /usr/ports/print/xmbibtex/Makefile print/xmbibtex/Makefile
--- /usr/ports/print/xmbibtex/Makefile	2013-11-06 22:05:15.000000000 +0900
+++ print/xmbibtex/Makefile	2013-11-25 00:00:00.000000000 +0900
@@ -5,8 +5,7 @@
 PORTVERSION=	1.7
 PORTREVISION=	3
 CATEGORIES=	print databases
-MASTER_SITES=	${MASTER_SITE_SUNSITE}
-MASTER_SITE_SUBDIR=	apps/tex
+MASTER_SITES=	SUNSITE/apps/tex
 
 MAINTAINER=	ports at FreeBSD.org
 COMMENT=	Reference manager based on the BibTeX file format
@@ -19,9 +18,4 @@
 
 PLIST_FILES=	bin/xmbibtex lib/X11/app-defaults/XmBibTeX
 
-NO_STAGE=	yes
-post-configure:
-	@${REINPLACE_CMD} -e 's,(CCLINK,(CXXLINK, ; s,/usr/local,${PREFIX},' \
-		${WRKSRC}/Makefile
-
 .include <bsd.port.mk>
diff -urN /usr/ports/print/xmbibtex/files/patch-aa print/xmbibtex/files/patch-aa
--- /usr/ports/print/xmbibtex/files/patch-aa	2013-11-06 22:05:15.000000000 +0900
+++ print/xmbibtex/files/patch-aa	2013-11-25 00:00:00.000000000 +0900
@@ -1,11 +1,11 @@
 --- Imakefile.orig	Sun Oct 19 02:50:16 1997
 +++ Imakefile	Sun Nov 12 20:17:11 2000
-@@ -1,11 +1,11 @@
--SYS_LIBRARIES = -lXm -lXt -lSM -lICE -lX11 -lXpm -lXext -lXmu
+@@ -1,11 +1,12 @@
+ SYS_LIBRARIES = -lXm -lXt -lSM -lICE -lX11 -lXpm -lXext -lXmu
 -CC            = g++
 -INCLUDES      = -I/usr/include/g++
-+SYS_LIBRARIES = ${MOTIFLIB} -lXt -lSM -lICE -lX11 -lXpm -lXext -lXmu
 +CC            = $(CXX)
++CCLINK        = $(CXXLINK)
 +XCOMM INCLUDES      = -I/usr/include/g++
  
 -BINDIR        = /usr/local/bin
diff -urN /usr/ports/print/xmbibtex/files/patch-print_cb.cc print/xmbibtex/files/patch-print_cb.cc
--- /usr/ports/print/xmbibtex/files/patch-print_cb.cc	1970-01-01 09:00:00.000000000 +0900
+++ print/xmbibtex/files/patch-print_cb.cc	2013-11-25 00:00:00.000000000 +0900
@@ -0,0 +1,46 @@
+--- print_cb.cc.orig
++++ print_cb.cc
+@@ -2,9 +2,9 @@
+ /* Print LaTeX Module     */
+ /* Last change 18.08.1996 */
+ 
+-#include <iostream.h>
+-#include <fstream.h>
+-#include <string.h>
++#include <iostream>
++#include <fstream>
++#include <cstring>
+ #include <X11/cursorfont.h>
+ #include "globals.h"
+ 
+@@ -13,18 +13,18 @@
+   char          *filename;
+   char          *db, *pdb;
+   unsigned long n;
+-  ofstream      out;
++  std::ofstream out;
+   Cursor        uhr, pfeil;
+ 
+   XmFileSelectionBoxCallbackStruct *cbs=
+     (XmFileSelectionBoxCallbackStruct *) call_data;
+ 
+   if (!XmStringGetLtoR(cbs->value, XmFONTLIST_DEFAULT_TAG, &filename)) {
+-    cout << "Internal error pasting filename! \n";
++    std::cout << "Internal error pasting filename! \n";
+     return;
+   }
+   if (!*filename) {
+-    cout << "No file selected! \n";
++    std::cout << "No file selected! \n";
+     XtFree(filename);
+     return;
+   }
+@@ -37,7 +37,7 @@
+ 
+   out.open(filename);
+   if(!out) {
+-    cout << "Cannot open LaTeX file for output! \n";
++    std::cout << "Cannot open LaTeX file for output! \n";
+     return;
+   }
+ 
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-ports-bugs mailing list