Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Jan 2012 20:05:06 +0000
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Mark Linimon <linimon@lonesome.com>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: with the cvs history? trying to help INDEX builds.
Message-ID:  <4F1B1A72.9030506@infracaninophile.co.uk>
In-Reply-To: <20120121193347.GD4729@lonesome.com>
References:  <4F177264.3090708@freebsd.org> <4F17DB1C.6080503@infracaninophile.co.uk> <20120121193347.GD4729@lonesome.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig843131F9CF898182E6954D1F
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 21/01/2012 19:33, Mark Linimon wrote:
> On Thu, Jan 19, 2012 at 08:58:04AM +0000, Matthew Seaman wrote:
>> By my calculations there are 28 ports that set 'BROKEN' because of
>> architecture incompatibility on my amd64 system
>=20
> IMHO these Makefiles are broken and should be fixed.

Actually, collecting the data by another method, it seems that there are
359 ports that set BROKEN with the reason mentioning ${ARCH}, i386,
amd64, ia64, powerpc or sparc.  Of course this doesn't pick up cases
where there's no clue about the architecture in the BROKEN message.

I have a patch adding a BROKEN_FOR_ARCHS variable, parallel to
ONLY_FOR_ARCHS, but I haven't managed to test it properly yet.  I
thought I'd try applying it or {ONLY,NOT}_FOR_ARCHS (as I judge[*]
appropriate) to the 79 of those ports which haven't got a maintainer,
which should show well enough if it works properly.

	Cheers,

	Matthew

[*] well, more like guess really.

---------------------------------------------------

How I worked out those numbers:

i) Used my portindexdb stuff to get a list of all the Makefiles under
/usr/ports/*/*/:

select path from makefile where path ~ '^/usr/ports/[^/]+/[^/]+/'

ii) Grep through those makefiles for lines starting BROKEN=3D and
mentioning something to do with CPU architecture:

< /tmp/ports-makefiles xargs grep -l
'^BROKEN=3D.*\(${ARCH}\|i386\|amd64\|ia64\|powerpc\|sparc\)' >
/tmp/ports-BROKEN-for-arch

-- results in 359 matches

iii) Then grep through those 359 makefiles for ones containing
ports@FreeBSD.org

% < /tmp/ports-BROKEN-for-arch xargs grep -l 'ports@FreeBSD.org' >
/tmp/ports-BROKEN-for-arch-unmaintained

-- results in 79 matches.

MK/bsd.ports.mk patch:

cvs diff: Diffing .
Index: bsd.port.mk
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.702
diff -u -u -r1.702 bsd.port.mk
--- bsd.port.mk	15 Jan 2012 22:13:42 -0000	1.702
+++ bsd.port.mk	21 Jan 2012 19:36:50 -0000
@@ -222,6 +222,18 @@
 #				- Set this instead of ONLY_FOR_ARCHS if the given port
 #				  fetches and installs compiled i386 binaries.
 #
+# Set these if your port temporarily does not work on certain
+# architectures due to programming errors, broken dependencies
+# etc. Values are lists of architecture names as above. (Defaults: not
+# set)
+#
+# BROKEN_FOR_ARCHS
+#               - Declare port broken on ${ARCH} if the port is temporar=
ily
+#                 unusable there
+# BROKEN_FOR_ARCHS_REASON
+# BROKEN_FOR_ARCHS_REASON_${ARCH}
+#               - Reason why the port is broken on ${ARCH}
+#
 # Dependency checking.  Use these if your port requires another port
 # not in the list below.  (Default: empty.)
 #
@@ -3156,6 +3168,26 @@

 .endif

+.if defined(BROKEN_FOR_ARCHS)
+.for __BARCH in ${BROKEN_FOR_ARCHS}
+.if ${ARCH:M${__BARCH}} !=3D ""
+__ARCH_BROKEN?=3D		1
+.endif
+.endfor
+
+.if defined(__ARCH_BROKEN)
+BROKEN=3D		broken on ${BROKEN_FOR_ARCHS}, and you are running ${ARCH}
+
+.if defined(BROKEN_FOR_ARCHS_REASON_${ARCH})
+BROKEN+=3D	(reason: ${BROKEN_FOR_ARCHS_REASON_${ARCH})
+.elif defined(BROKEN_FOR_ARCHS_REASON)
+BROKEN+=3D	(reason: ${BROKEN_FOR_ARCHS_REASON})
+.endif
+
+.endif
+
+.endif
+
 # Check the user interaction and legal issues
 .if !defined(NO_IGNORE)
 .if (defined(IS_INTERACTIVE) && defined(BATCH))

As I said, not tested yet.  I'll submit this and patches against those
79 ports as a PR once I've managed to do that.

--=20
Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey     Ramsgate
JID: matthew@infracaninophile.co.uk               Kent, CT11 9PW


--------------enig843131F9CF898182E6954D1F
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk8bGnoACgkQ8Mjk52CukIx9cgCbBZ5HCYEjvqCik3JX50P2uGQ2
16QAnjS0s8h6Iq8AR7QkZPVoQ6+ZzoUj
=sHpw
-----END PGP SIGNATURE-----

--------------enig843131F9CF898182E6954D1F--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F1B1A72.9030506>