1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-22 08:58:47 +00:00

* Fix build with GCC3 (-CURRENT).

* Honor CXX/CXXFLAGS.
* Use predefined DOCSDIR and EXAMPLESDIR variables.

Approved by:	maintainer timeout
This commit is contained in:
Christian Weisgerber 2003-03-25 12:28:57 +00:00
parent 042500500d
commit 3e8676b331
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=77447
5 changed files with 89 additions and 24 deletions

View File

@ -23,20 +23,18 @@ MAN1= chemeq.1
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/src/chemeq ${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/chemeq.1 ${MAN1PREFIX}/man/man1
post-install:
.if !defined(NOPORTDOCS)
${MKDIR} ${PREFIX}/share/doc/chemeq
${MKDIR} ${PREFIX}/share/examples/chemeq
${INSTALL_DATA} ${WRKSRC}/COPYING ${PREFIX}/share/doc/chemeq
${INSTALL_DATA} ${WRKSRC}/LISEZMOI ${PREFIX}/share/doc/chemeq
${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/chemeq
${INSTALL_DATA} ${WRKSRC}/src/TODO ${PREFIX}/share/examples/chemeq
${INSTALL_DATA} ${WRKSRC}/src/test.1 ${PREFIX}/share/examples/chemeq
${INSTALL_SCRIPT} ${WRKSRC}/src/chemreport ${PREFIX}/share/examples/chemeq
${INSTALL_SCRIPT} ${WRKSRC}/src/chemreport.pl ${PREFIX}/share/examples/chemeq
${INSTALL_SCRIPT} ${WRKSRC}/src/chemtest ${PREFIX}/share/examples/chemeq
${INSTALL_SCRIPT} ${WRKSRC}/src/chemtest.pl ${PREFIX}/share/examples/chemeq
${MKDIR} ${DOCSDIR}
${MKDIR} ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/COPYING ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/LISEZMOI ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/src/TODO ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/src/test.1 ${EXAMPLESDIR}
${INSTALL_SCRIPT} ${WRKSRC}/src/chemreport ${EXAMPLESDIR}
${INSTALL_SCRIPT} ${WRKSRC}/src/chemreport.pl ${EXAMPLESDIR}
${INSTALL_SCRIPT} ${WRKSRC}/src/chemtest ${EXAMPLESDIR}
${INSTALL_SCRIPT} ${WRKSRC}/src/chemtest.pl ${EXAMPLESDIR}
.endif
.include <bsd.port.mk>

View File

@ -0,0 +1,24 @@
$FreeBSD$
--- src/Makefile.orig Sat Mar 8 21:56:02 2003
+++ src/Makefile Sat Mar 8 21:56:33 2003
@@ -1,14 +1,14 @@
#CXXFLAGS= -g
-CXXFLAGS= -O1
+#CXXFLAGS= -O1
chemeq : chemeq.o chemparser.o
- g++ $(CXXFLAGS) -o chemeq chemeq.o chemparser.o -lfl
+ $(CXX) $(CXXFLAGS) -o chemeq chemeq.o chemparser.o -lfl
chemeq.o : chemeq.cc chemeq.h
- g++ $(CXXFLAGS) -c chemeq.cc
+ $(CXX) $(CXXFLAGS) -c chemeq.cc
chemparser.o : chemparser.cc chemeq.h
- g++ $(CXXFLAGS) -c chemparser.cc
+ $(CXX) $(CXXFLAGS) -c chemparser.cc
chemparser.cc : chemlex.cc chemeq.y chemeq.h
bison --verbose -o chemparser.cc chemeq.y

View File

@ -0,0 +1,23 @@
$FreeBSD$
--- src/chemeq.cc.orig Thu May 10 19:10:19 2001
+++ src/chemeq.cc Sat Mar 8 21:59:37 2003
@@ -150,7 +150,7 @@
if (suiv) suiv->compte(c,mult);
};
-void AtomeListe::numerote(int n=0){
+void AtomeListe::numerote(int n){
if(Zed!=0){ /* cas où ce n'est pas un groupe */
no = n;
}
@@ -245,7 +245,7 @@
nb.simplifie();
}
-bool Molec::printNernst(ostream & o, char * prefix =""){
+bool Molec::printNernst(ostream & o, char * prefix){
switch(t){
case sol : return 0;
case aqueous :

View File

@ -0,0 +1,19 @@
$FreeBSD$
--- src/chemeq.h.orig Sat Mar 8 21:48:53 2003
+++ src/chemeq.h Sat Mar 8 21:50:34 2003
@@ -2,10 +2,12 @@
#define CHEMEQ_H
#include <string.h>
-#include <stdiostream.h>
+#include <iostream>
#include <vector>
#include <string>
#include <map>
+
+using namespace std;
typedef struct {
int Zed;

View File

@ -1,12 +1,13 @@
@comment $FreeBSD$
bin/chemeq
%%PORTDOCS%%share/doc/chemeq/COPYING
%%PORTDOCS%%share/doc/chemeq/LISEZMOI
%%PORTDOCS%%share/doc/chemeq/README
%%PORTDOCS%%share/examples/chemeq/TODO
%%PORTDOCS%%share/examples/chemeq/test.1
%%PORTDOCS%%share/examples/chemeq/chemreport
%%PORTDOCS%%share/examples/chemeq/chemreport.pl
%%PORTDOCS%%share/examples/chemeq/chemtest
%%PORTDOCS%%share/examples/chemeq/chemtest.pl
%%PORTDOCS%%@dirrm share/doc/chemeq
%%PORTDOCS%%@dirrm share/examples/chemeq
%%PORTDOCS%%%%DOCSDIR%%/COPYING
%%PORTDOCS%%%%DOCSDIR%%/LISEZMOI
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%%%EXAMPLESDIR%%/TODO
%%PORTDOCS%%%%EXAMPLESDIR%%/test.1
%%PORTDOCS%%%%EXAMPLESDIR%%/chemreport
%%PORTDOCS%%%%EXAMPLESDIR%%/chemreport.pl
%%PORTDOCS%%%%EXAMPLESDIR%%/chemtest
%%PORTDOCS%%%%EXAMPLESDIR%%/chemtest.pl
%%PORTDOCS%%@dirrm %%DOCSDIR%%
%%PORTDOCS%%@dirrm %%EXAMPLESDIR%%