View | Details | Raw Unified | Return to bug 286634 | Differences between
and this patch

Collapse All | Expand All

(-)b/devel/csmith/Makefile (-17 / +20 lines)
Lines 1-33 Link Here
1
PORTNAME=	csmith
1
PORTNAME=	csmith
2
PORTVERSION=	2.3.0
2
PORTVERSION=	2.4.0
3
CATEGORIES=	devel
3
CATEGORIES=	devel
4
MASTER_SITES=	http://embed.cs.utah.edu/csmith/
5
4
6
MAINTAINER=	ports@FreeBSD.org
5
MAINTAINER=	portmaster@BSDforge.com
7
COMMENT=	Generates random C programs that conform to the C99 standard
6
COMMENT=	Generates random C programs that conform to the C99 standard
8
WWW=		https://embed.cs.utah.edu/csmith/
7
WWW=		https://github.com/csmith-project/csmith
9
8
10
LICENSE=	BSD2CLAUSE
9
LICENSE=	BSD2CLAUSE
11
10
12
BROKEN=		Unfetchable
11
USES=		cmake libtool localbase perl5 shebangfix
13
DEPRECATED=	Unmaintained for years
14
EXPIRATION_DATE=2024-06-30
15
16
USES=		gmake libtool localbase perl5 shebangfix
17
USE_CXXSTD=	c++11
12
USE_CXXSTD=	c++11
13
USE_GITHUB=	yes
14
GH_ACCOUNT=	csmith-project
15
GH_TAGNAME=	0ec6f1b
18
USE_LDCONFIG=	yes
16
USE_LDCONFIG=	yes
19
USE_PERL5=	run
17
USE_PERL5=	run
20
18
21
SHEBANG_FILES=	scripts/compiler_test.pl scripts/launchn.pl
19
SHEBANG_FILES=	scripts/compiler_test.pl scripts/launchn.pl
20
# kill these next time I get a couple extra cycles...
21
CXXFLAGS+=	-Wno-deprecated-declarations -Wno-unused-variable \
22
		-Wno-unused-parameter
22
23
23
GNU_CONFIGURE=	yes
24
OPTIONS_DEFINE=		DOCS
24
CONFIGURE_ARGS=	--docdir=${DOCSDIR}
25
CMAKE_INSTALL_DO_STRIP=	yes
25
26
INSTALL_TARGET=	install-strip
27
28
PLIST_SUB=	PKGNAME="${PKGNAME}"
29
30
OPTIONS_DEFINE=	DOCS
31
26
32
.include <bsd.port.options.mk>
27
.include <bsd.port.options.mk>
33
28
Lines 35-38 OPTIONS_DEFINE= DOCS Link Here
35
CPPFLAGS+=	-Wno-error=enum-constexpr-conversion
30
CPPFLAGS+=	-Wno-error=enum-constexpr-conversion
36
.endif
31
.endif
37
32
33
pre-configure:
34
# install
35
	${REINPLACE_CMD} -e 's|CMAKE_INSTALL_PREFIX}/include/|CMAKE_INSTALL_PREFIX}/include/csmith/|'	\
36
		${WRKSRC}/runtime/CMakeLists.txt
37
# speed/performance
38
	${REINPLACE_CMD} -e 's|tmp = tmp.substr(0, pos);|tmp.resize(pos);|'	\
39
		${WRKSRC}/src/Effect.cpp
40
38
.include <bsd.port.mk>
41
.include <bsd.port.mk>
(-)b/devel/csmith/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1498294369
1
TIMESTAMP = 1746554894
2
SHA256 (csmith-2.3.0.tar.gz) = f247cc0aede5f8a0746271b40a5092b5b5a2d034e5e8f7a836c879dde3fb65d5
2
SHA256 (csmith-project-csmith-2.4.0-0ec6f1b_GH0.tar.gz) = 10f8a1e630748e32782c06bb09163c2244d80d565e40575a88e5e8be242215b9
3
SIZE (csmith-2.3.0.tar.gz) = 637381
3
SIZE (csmith-project-csmith-2.4.0-0ec6f1b_GH0.tar.gz) = 322451
(-)b/devel/csmith/files/patch-src_ArrayVariable.cpp (+20 lines)
Added Link Here
1
--- src/ArrayVariable.cpp.orig	2025-05-06 09:52:57 UTC
2
+++ src/ArrayVariable.cpp
3
@@ -631,7 +631,7 @@
4
 void
5
 ArrayVariable::output_checksum_with_indices(std::ostream &out,
6
 					const std::vector<const Variable*>& cvs,
7
-					string field_name) const
8
+					const string &field_name) const
9
 {
10
 	out << "printf(\"...checksum after hashing ";
11
 
12
@@ -697,7 +697,7 @@
13
 
14
 // --------------------------------------------------------------
15
 void
16
-ArrayVariable::output_addr_checks(std::ostream &out, const Variable* var, string field_name, int indent) const
17
+ArrayVariable::output_addr_checks(std::ostream &out, const Variable* var, const string &field_name, int indent) const
18
 {
19
 	size_t i;
20
 	vector<const Variable *> &ctrl_vars = Variable::get_new_ctrl_vars();
(-)b/devel/csmith/files/patch-src_ArrayVariable.h (+14 lines)
Added Link Here
1
--- src/ArrayVariable.h.orig	2025-05-06 09:46:39 UTC
2
+++ src/ArrayVariable.h
3
@@ -76,9 +76,9 @@
4
 	virtual void OutputLowerBound(std::ostream &) const;
5
 	virtual void OutputUpperBound(std::ostream &) const;
6
 	void output_with_indices(std::ostream &out, const std::vector<const Variable*>& cvs) const;
7
-	void output_checksum_with_indices(std::ostream &out, const std::vector<const Variable*>& cvs, string field_name) const;
8
+	void output_checksum_with_indices(std::ostream &out, const std::vector<const Variable*>& cvs, const string &field_name) const;
9
 	void output_init(std::ostream &out, const Expression* init, const vector<const Variable*>& cvs, int indent) const;
10
-	void output_addr_checks(std::ostream &out, const Variable* var, string field_name, int indent) const;
11
+	void output_addr_checks(std::ostream &out, const Variable* var, const string &field_name, int indent) const;
12
 	void add_init_value(const Expression* e) { init_values.push_back(e);}
13
 	const vector<const Expression*>& get_init_values(void) const { return init_values;}
14
 	string build_initializer_str(const vector<string>& init_strings) const;
(-)b/devel/csmith/files/patch-src_Attribute.cpp (+44 lines)
Added Link Here
1
--- src/Attribute.cpp.orig	2025-05-06 09:33:29 UTC
2
+++ src/Attribute.cpp
3
@@ -31,12 +31,12 @@
4
 		out << "))";
5
 }
6
 
7
-Attribute::Attribute(string name, int prob)
8
+Attribute::Attribute(const string &name, int prob)
9
 	:  name(name), prob(prob)
10
 {
11
 }
12
 
13
-BooleanAttribute::BooleanAttribute(string name, int prob)
14
+BooleanAttribute::BooleanAttribute(const string &name, int prob)
15
 	: Attribute(name, prob)
16
 {
17
 }
18
@@ -50,7 +50,7 @@
19
 		return "";
20
 }
21
 
22
-MultiChoiceAttribute::MultiChoiceAttribute(string name, int prob, vector<string> arguments)
23
+MultiChoiceAttribute::MultiChoiceAttribute(const string &name, int prob, vector<string> arguments)
24
 	: Attribute(name, prob), choices(arguments)
25
 {
26
 }
27
@@ -64,7 +64,7 @@
28
 		return "";
29
 }
30
 
31
-AlignedAttribute::AlignedAttribute(string name, int prob, int alignment_factor)
32
+AlignedAttribute::AlignedAttribute(const string &name, int prob, int alignment_factor)
33
 	: Attribute(name, prob), alignment(alignment_factor)
34
 {
35
 }
36
@@ -81,7 +81,7 @@
37
 		return "";
38
 }
39
 
40
-SectionAttribute::SectionAttribute(string name, int prob)
41
+SectionAttribute::SectionAttribute(const string &name, int prob)
42
 	: Attribute(name, prob)
43
 {
44
 }
(-)b/devel/csmith/files/patch-src_Attribute.h (+47 lines)
Added Link Here
1
--- src/Attribute.h.orig	2025-05-06 09:24:22 UTC
2
+++ src/Attribute.h
3
@@ -16,7 +16,7 @@
4
 	string name;
5
 	//Attribute generation probability
6
 	int prob;
7
-	Attribute(string, int);
8
+	Attribute( const string &, int);
9
 	//Checks attribute probability and generate is accordingly
10
 	virtual string make_random() = 0;
11
 };
12
@@ -25,7 +25,7 @@
13
 class BooleanAttribute : public Attribute
14
 {
15
 public:
16
-	BooleanAttribute(string, int);
17
+	BooleanAttribute(const string&, int);
18
 	string make_random();
19
 };
20
 
21
@@ -35,7 +35,7 @@
22
 public:
23
 	//stores various options of attributes e.g. visibility options - default, hidden, internal and protected
24
 	vector<string> choices;
25
-	MultiChoiceAttribute(string, int, vector<string>);
26
+	MultiChoiceAttribute(const string &, int, vector<string>);
27
 	string make_random();
28
 };
29
 
30
@@ -45,7 +45,7 @@
31
 public:
32
 	//alignment factor - [functions] = 16 and [types] = 8 i.e. functions can take alignment upto 2^16 where as type can take upto 2^8
33
 	int alignment;
34
-	AlignedAttribute(string, int, int);
35
+	AlignedAttribute(const string &, int, int);
36
 	string make_random();
37
 };
38
 
39
@@ -53,7 +53,7 @@
40
 class SectionAttribute : public Attribute
41
 {
42
 public:
43
-	SectionAttribute(string, int);
44
+	SectionAttribute( const string &, int);
45
 	string make_random();
46
 };
47
 
(-)b/devel/csmith/files/patch-src_Filter.h (+13 lines)
Added Link Here
1
--- src/Filter.h.orig	2025-05-06 08:52:11 UTC
2
+++ src/Filter.h
3
@@ -35,9 +35,8 @@
4
 enum FilterKind {
5
 	fDefault,
6
 	fDFS,
7
+	MAX_FILTER_KIND_SIZE,
8
 };
9
-
10
-#define MAX_FILTER_KIND_SIZE ((FilterKind) (fDFS + 1))
11
 
12
 // Filter base class
13
 class Filter
(-)b/devel/csmith/pkg-plist (-20 / +19 lines)
Lines 2-26 bin/compiler_test.in Link Here
2
bin/compiler_test.pl
2
bin/compiler_test.pl
3
bin/csmith
3
bin/csmith
4
bin/launchn.pl
4
bin/launchn.pl
5
include/%%PKGNAME%%/csmith.h
5
include/csmith/csmith.h
6
include/%%PKGNAME%%/csmith_minimal.h
6
include/csmith/csmith_minimal.h
7
include/%%PKGNAME%%/custom_limits.h
7
include/csmith/custom_limits.h
8
include/%%PKGNAME%%/custom_stdint_x86.h
8
include/csmith/custom_stdint_x86.h
9
include/%%PKGNAME%%/platform_avr.h
9
include/csmith/platform_avr.h
10
include/%%PKGNAME%%/platform_generic.h
10
include/csmith/platform_generic.h
11
include/%%PKGNAME%%/platform_msp430.h
11
include/csmith/platform_msp430.h
12
include/%%PKGNAME%%/random_inc.h
12
include/csmith/random_inc.h
13
include/%%PKGNAME%%/safe_abbrev.h
13
include/csmith/safe_abbrev.h
14
include/%%PKGNAME%%/safe_math.h
14
include/csmith/safe_math.h
15
include/%%PKGNAME%%/safe_math_macros.h
15
include/csmith/safe_math_macros.h
16
include/%%PKGNAME%%/safe_math_macros_notmp.h
16
include/csmith/safe_math_macros_notmp.h
17
include/%%PKGNAME%%/stdint_avr.h
17
include/csmith/stdint_avr.h
18
include/%%PKGNAME%%/stdint_ia32.h
18
include/csmith/stdint_ia32.h
19
include/%%PKGNAME%%/stdint_ia64.h
19
include/csmith/stdint_ia64.h
20
include/%%PKGNAME%%/stdint_msp430.h
20
include/csmith/stdint_msp430.h
21
include/%%PKGNAME%%/volatile_runtime.c
21
include/csmith/volatile_runtime.c
22
include/%%PKGNAME%%/volatile_runtime.h
22
include/csmith/volatile_runtime.h
23
include/%%PKGNAME%%/windows/stdint.h
23
include/csmith/windows/stdint.h
24
lib/libcsmith.a
24
lib/libcsmith.a
25
lib/libcsmith.so
25
lib/libcsmith.so
26
lib/libcsmith.so.0
26
lib/libcsmith.so.0
27
- 

Return to bug 286634