aboutsummaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorPiotr Kubaj <pkubaj@FreeBSD.org>2020-07-22 22:04:43 +0000
committerPiotr Kubaj <pkubaj@FreeBSD.org>2020-07-22 22:04:43 +0000
commitec80fdfaded4d6b831b73f918cd23ab8ec876a5f (patch)
tree9df25a64f33cc6aac6817452e92ea7c1c49fa705 /sysutils
parentc0fe05ecc9ba96df204cf272a9810316642517b3 (diff)
downloadports-ec80fdfaded4d6b831b73f918cd23ab8ec876a5f.tar.gz
ports-ec80fdfaded4d6b831b73f918cd23ab8ec876a5f.zip
MFH: r542896
sysutils/rovclock: fix build on aarch64, armv6, armv7, mips, mips64, powerpc64 Probably other architectures are also fixed but only those are marked broken. machine/pio.h is necessary for outl(). PR: 248170 Approved by: portmgr (blanket: build fix (multiple archs))
Notes
Notes: svn path=/branches/2020Q3/; revision=542897
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/rovclock/Makefile7
-rw-r--r--sysutils/rovclock/files/patch-rovclock.c15
2 files changed, 9 insertions, 13 deletions
diff --git a/sysutils/rovclock/Makefile b/sysutils/rovclock/Makefile
index ffc79a4a1b94..ac5cece70a9b 100644
--- a/sysutils/rovclock/Makefile
+++ b/sysutils/rovclock/Makefile
@@ -11,13 +11,6 @@ COMMENT= Overclocking utility for ATI Radeon video cards
LICENSE= GPLv2
-BROKEN_aarch64= fails to install: undefined reference to outl
-BROKEN_armv6= fails to install: undefined reference to outl
-BROKEN_armv7= fails to install: undefined reference to outl
-BROKEN_mips= fails to install: undefined reference to outl
-BROKEN_mips64= fails to install: undefined reference to outl
-BROKEN_powerpc64= fails to install: undefined reference to outl
-
USES= tar:bzip2
PLIST_FILES= man/man8/${PORTNAME}.8.gz sbin/${PORTNAME}
diff --git a/sysutils/rovclock/files/patch-rovclock.c b/sysutils/rovclock/files/patch-rovclock.c
index 61883a775b92..a776335b836c 100644
--- a/sysutils/rovclock/files/patch-rovclock.c
+++ b/sysutils/rovclock/files/patch-rovclock.c
@@ -1,6 +1,6 @@
--- rovclock.c.orig 2006-01-04 21:23:32 UTC
+++ rovclock.c
-@@ -20,11 +20,13 @@
+@@ -20,11 +20,16 @@
*/
/*****************************************************************************/
@@ -11,11 +11,14 @@
#include <getopt.h>
-#include <sys/io.h>
+#include <sys/types.h>
++#if !defined(__amd64__) && !defined(__i386__)
++#include <machine/pio.h>
++#endif
+#include <machine/cpufunc.h>
#include <sys/mman.h>
#include "pci.h"
-@@ -122,18 +124,18 @@ struct rovclock_data {
+@@ -122,18 +127,18 @@ struct rovclock_data {
/* PCI read/write functions */
unsigned int pci_read(u8 bus, u8 device, u8 func, u8 addr)
{
@@ -39,7 +42,7 @@
}
/* Register read/write functions */
-@@ -144,38 +146,38 @@ u32 reg_read(struct rovclock_data *rovcl
+@@ -144,38 +149,38 @@ u32 reg_read(struct rovclock_data *rovclock, u32 addr)
void reg_write(struct rovclock_data *rovclock, u32 addr, u32 data)
{
@@ -86,7 +89,7 @@
}
/* Print usage */
-@@ -281,10 +283,11 @@ void pll_set_freq(struct rovclock_data *
+@@ -281,10 +286,11 @@ void pll_set_freq(struct rovclock_data *rovclock)
/* Search for ATI card on PCI bus */
int find_card(struct rovclock_data *rovclock)
{
@@ -100,7 +103,7 @@
/* Check /proc/bus/pci/devices first */
if ((proc = fopen("/proc/bus/pci/devices", "r")) != NULL) {
while (fscanf(proc, "%x\t%x", &rovclock->pci_bus, &id) == 2) {
-@@ -305,8 +308,9 @@ int find_card(struct rovclock_data *rovc
+@@ -305,8 +311,9 @@ int find_card(struct rovclock_data *rovclock)
break;
}
}
@@ -111,7 +114,7 @@
/* Find card by scanning the PCI devices, check from bus 1 to 9 for ATI device */
rovclock->pci_dev = 0;
-@@ -423,7 +427,7 @@ int main(int argc, char **argv)
+@@ -423,7 +430,7 @@ int main(int argc, char **argv)
}
/* Get I/O permission */