Date: Thu, 7 Aug 2014 15:31:22 +0000 (UTC) From: Vanilla I. Shu <vanilla@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r364290 - in head/sysutils/libretto-config: . files Message-ID: <53e39bcb.597a.750c91c6@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: vanilla Date: Thu Aug 7 15:31:22 2014 New Revision: 364290 URL: http://svnweb.freebsd.org/changeset/ports/364290 QAT: https://qat.redports.org/buildarchive/r364290/ Log: 1: add USE_GCC=any to unbreak build. 2: stagify. 3: rename patch-xx Added: head/sysutils/libretto-config/files/patch-Makefile - copied, changed from r364266, head/sysutils/libretto-config/files/patch-aa head/sysutils/libretto-config/files/patch-libapm-e.man - copied unchanged from r364266, head/sysutils/libretto-config/files/patch-ad head/sysutils/libretto-config/files/patch-libapm-j.man - copied unchanged from r364266, head/sysutils/libretto-config/files/patch-ae head/sysutils/libretto-config/files/patch-libapm.c - copied unchanged from r364266, head/sysutils/libretto-config/files/patch-ab head/sysutils/libretto-config/files/patch-libapm.h - copied unchanged from r364266, head/sysutils/libretto-config/files/patch-ac Deleted: head/sysutils/libretto-config/files/patch-aa head/sysutils/libretto-config/files/patch-ab head/sysutils/libretto-config/files/patch-ac head/sysutils/libretto-config/files/patch-ad head/sysutils/libretto-config/files/patch-ae Modified: head/sysutils/libretto-config/Makefile Modified: head/sysutils/libretto-config/Makefile ============================================================================== --- head/sysutils/libretto-config/Makefile Thu Aug 7 15:29:13 2014 (r364289) +++ head/sysutils/libretto-config/Makefile Thu Aug 7 15:31:22 2014 (r364290) @@ -15,26 +15,17 @@ ONLY_FOR_ARCHS= i386 WRKSRC= ${WRKDIR}/libapm -PLIST_FILES= sbin/libretto-config -MAN8= ${PORTNAME}.8 -MANLANG= . ja - +USE_GCC= any OPTIONS_DEFINE= DOCS PORTDOCS= * -NO_STAGE= yes -.include <bsd.port.options.mk> - post-install: -# install japanese manpage also :-) - ${INSTALL_MAN} ${WRKSRC}/libapm-j.man ${PREFIX}/man/ja/man8/${PORTNAME}.8 -.if ${PORT_OPTIONS:MDOCS} - @${MKDIR} ${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/README-e.1st ${DOCSDIR}/README.1st - ${INSTALL_DATA} ${WRKSRC}/APM-EXBIOS-e.txt ${DOCSDIR}/APM-EXBIOS.txt - @${MKDIR} ${DOCSDIR}/ja - ${INSTALL_DATA} ${WRKSRC}/README-j.1st ${DOCSDIR}/ja/README.1st - ${INSTALL_DATA} ${WRKSRC}/APM-EXBIOS-j.txt ${DOCSDIR}/ja/APM-EXBIOS.txt -.endif + ${INSTALL_MAN} ${WRKSRC}/libapm-j.man ${STAGEDIR}${PREFIX}/man/ja/man8/${PORTNAME}.8 + @${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/README-e.1st ${STAGEDIR}${DOCSDIR}/README.1st + ${INSTALL_DATA} ${WRKSRC}/APM-EXBIOS-e.txt ${STAGEDIR}${DOCSDIR}/APM-EXBIOS.txt + @${MKDIR} ${STAGEDIR}${DOCSDIR}/ja + ${INSTALL_DATA} ${WRKSRC}/README-j.1st ${STAGEDIR}${DOCSDIR}/ja/README.1st + ${INSTALL_DATA} ${WRKSRC}/APM-EXBIOS-j.txt ${STAGEDIR}${DOCSDIR}/ja/APM-EXBIOS.txt .include <bsd.port.mk> Copied and modified: head/sysutils/libretto-config/files/patch-Makefile (from r364266, head/sysutils/libretto-config/files/patch-aa) ============================================================================== --- head/sysutils/libretto-config/files/patch-aa Thu Aug 7 12:42:37 2014 (r364266, copy source) +++ head/sysutils/libretto-config/files/patch-Makefile Thu Aug 7 15:31:22 2014 (r364290) @@ -39,12 +39,12 @@ install.bin: - install -c -s $(OWNER) $(GROUP) $(MODE) $(PROGRAM) $(BINDIR) -+ install -c -s $(OWNER) $(GROUP) $(MODE) $(PROGRAM) $(BINDIR)/$(PROGRAM_NAME) ++ install -c -s $(OWNER) $(GROUP) $(MODE) $(PROGRAM) $(DESTDIR)$(BINDIR)/$(PROGRAM_NAME) install.man: - - mkdir $(MANDIR)/man$(MANSECT) - install -c -m 644 libapm-${MANLANG}.man $(MANDIR)/man$(MANSECT)/libapm.$(MANSECT) - -+ ${BSD_INSTALL_MAN} libapm-${MANLANG}.man $(MANDIR)/man$(MANSECT)/$(PROGRAM_NAME).$(MANSECT) ++ ${BSD_INSTALL_MAN} libapm-${MANLANG}.man $(DESTDIR)$(MANDIR)/man$(MANSECT)/$(PROGRAM_NAME).$(MANSECT) + +libapm.o: libapm.h libapm.c Copied: head/sysutils/libretto-config/files/patch-libapm-e.man (from r364266, head/sysutils/libretto-config/files/patch-ad) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/libretto-config/files/patch-libapm-e.man Thu Aug 7 15:31:22 2014 (r364290, copy of r364266, head/sysutils/libretto-config/files/patch-ad) @@ -0,0 +1,154 @@ +--- libapm-e.man.orig Fri Jun 19 04:02:48 1998 ++++ libapm-e.man Thu Aug 2 17:34:01 2001 +@@ -1,80 +1,98 @@ + .\" Written Tue May 12 19:30:00 1998 by ISHIOKA Takashi + .\" (ishioka@ppp01.infopepper.or.jp ) +-.TH libapm l "" "TOSHIBA Libretto only" "" ++.TH libretto-config 8 "" "TOSHIBA Libretto only" "" + .SH NAME +-libapm \- TOSHIBA Libretto BIOS Setup Program ++libretto-config \- TOSHIBA Libretto BIOS Setup Program + .SH SYNOPSIS + +-.B libapm +-{\-v,\-\-Version} +-{\-h,\-\-Help} ++.B libretto-config ++{\-v} ++{\-h} + +-.B libapm +-{\-P,\-\-PowerUp (boot,hibernation)} +-{\-T,\-\-StandbyTime (0,5,10,15,30,45,60)} +-{\-a,\-\-AutoOff (disable,10,20,30,40,50,60)} +-{\-S,\-\-PanelSwitch (disable,enable)} +-{\-A,\-\-PowerOn (disable,<time>)} +-{\-L,\-\-LcdPower (0,1,2,3)} +-{\-V,\-\-Volume (0,1,2,3)} +-{\-O,\-\-Off (suspend|hibernation)} ++.B libretto-config ++{\-P (boot,hibernation)} ++{\-T (0,5,10,15,30,45,60)} ++{\-a (disable,10,20,30,40,50,60)} ++{\-S (disable,enable)} ++{\-A (disable,<time>)} ++{\-L (0,1,2,3)} ++{\-V (0,1,2,3)} ++{\-O (suspend|hibernation)} + + .SH DESCRIPTION +-.B libapm +-configures the setting of Toshiba Libretto. ++.B libretto-config ++configures the BIOS settings of a Toshiba Libretto notebook computer. + Changes are done immediately and rebooting is not neccesary. + + .SH OPTIONS + .TP +-.B \-P,\-\-PowerUp (boot,hibernation) +-sets the Hibernation function. +-If hibernation is specified, the hibernation function is enabled. +-If boot is specified, it is disabled. ++.B \-P (boot,hibernation) ++sets Hibernation mode. ++The ``boot'' argument disables hibernation. ++Hibernation mode writes volatile memory ++to disk at power off. ++Without hibernation, ++the Libretto's power-down actions are destructive; ++there is no saving of machine state. + .TP +-.B \-T,\-\-StandbyTime (0,5,10,15,30,45,60) +-sets the Standby time. +-If the Stanby time is specified, the power is not cut after hibernation +-for that time in order to resume quickly from hibernation. +-You can select the time from 0, 5, 10, 15, 30, 45, 60 minutes. +-This function is valid if the hibernation function is enabled. ++.B \-T (0,5,10,15,30,45,60) ++sets a Standby Time. ++If a standby time is specified, ++power is not cut after hibernation ++for the specified time ++to allow a quick resume. ++A time of 0, 5, 10, 15, 30, 45 or 60 minutes ++may be selected. + .TP +-.B \-a,\-\-AutoOff (disable,10,20,30,40,50,60) +-sets the time to the Auto Power Off. +-You can select the time from disable, 10, 20, 30, 40, 50, 60 minutes. +-This function is valid if the hibernation function is enabled. ++.B \-a (disable,10,20,30,40,50,60) ++sets the time to Auto Power Off. ++A time of 10, 20, 30, 40, 50 or 60 minutes ++may be selected, ++or the word ``disabled'' may be used ++if Auto Power Off is not needed. + .TP +-.B \-S,\-\-PanelSwitch (disable,enable) +-sets the Panel Switch funtion. If enabled, hibernation is done by +-closing the panel and vice versa. +-This function is valid if the hibernation function is enabled. ++.B \-S (disable,enable) ++sets the Panel Switch function. ++If enabled, ++hibernation or power-down may be done ++by closing the front panel ++and the machine may be restarted ++by opening it. + .TP +-.B \-A,\-\-PowerOn (disable,<time>) +-sets the Power On timer. +-The format of the <time> is hh:mm. If time is specified, power is +-automatically turned on at the time. ++.B \-A (disable,<time>) ++sets the Power On Timer. ++If <time> is specified, ++power is automatically turned on ++at that time. ++The format of the <time> is hh:mm, ++and a value of ``disable'' ++turns off the power on timer. + .TP +-.B \-L,\-\-LcdPower (0,1,2,3) +-sets the brightness of the LCD. +-0 is the darkest and 3 is the brightest. ++.B \-L (0,1,2,3) ++sets the brightness of the display LCD. ++0 is the dimmest and 3 is the brightest. + .TP +-.B \-V,\-\-Volume (0,1,2,3) +-sets the volume of beep sound. +-0 is off, 1 is minimum and 3 is maximum. ++.B \-V (0,1,2,3) ++sets the volume of keyboard bell (system speaker). ++0 is off, 1 is quietest and 3 is loudest. + .TP +-.B \-O,\-\-Off (suspend|hibernation) +-sets the suspend/hibernation mode. (100CT Only) ++.B \-O (suspend|hibernation) ++sets the suspend/hibernation mode. (100CT/110CT Only) + .TP +-.B \-v,\-\-Version ++.B \-v + displays the version of this program. + .TP +-.B \-h,\-\-Help +-displays the simple usage. ++.B \-h ++displays a simple usage message. ++ ++.SH NOTES ++This program has no warranty at all. ++It may or may not contain bugs. + + .SH BUGS +-Completely no warranty. It may or may not contain any bugs. +-Operation on the machines but Toshiba Libretto is uncertain. +-A part of function might work on Toshiba's other notebook machines. +-You must have root privilege to run this program. ++Operation on any machines except Toshiba Libretto is unknown. ++Operation on other Toshiba notebook computer is uncertain. ++Superuser privelige is required to use this program. + + .SH AUTHORS + .TP Copied: head/sysutils/libretto-config/files/patch-libapm-j.man (from r364266, head/sysutils/libretto-config/files/patch-ae) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/libretto-config/files/patch-libapm-j.man Thu Aug 7 15:31:22 2014 (r364290, copy of r364266, head/sysutils/libretto-config/files/patch-ae) @@ -0,0 +1,110 @@ +--- libapm-j.man.orig Thu Jun 4 13:16:43 1998 ++++ libapm-j.man Thu Nov 26 12:40:28 1998 +@@ -1,38 +1,38 @@ + .\" Written Tue May 12 19:30:00 1998 by ISHIOKA Takashi + .\" Changes Thu Jun 3 12:10:28 1998 + .\" (ishioka@ppp01.infopepper.or.jp ) +-.TH libapm l "" "TOSHIBA Libretto only" "" ++.TH libretto-config 8 "" "TOSHIBA Libretto only" "" + .SH 名前 +-libapm \- 東芝Librettoの電源管理プログラム ++libretto-config \- 東芝Librettoの電源管理プログラム + .SH 書式 + +-.B libapm +-{\-v,\-\-Version} +-{\-h,\-\-Help} ++.B libretto-config ++{\-v} ++{\-h} + +-.B libapm +-{\-P,\-\-PowerUp (boot,hibernation)} +-{\-T,\-\-StandbyTime (0,5,10,15,30,45,60,unlimit)} +-{\-a,\-\-AutoOff (disable,10,20,30,40,50,60)} +-{\-S,\-\-PanelSwitch (disable,enable)} +-{\-A,\-\-AlarmOn (disable,<time>)} +-{\-L,\-\-LcdPower (0,1,2,3)} +-{\-V,\-\-Volume (0,1,2,3)} +-{\-O,\-\-Off (suspend|hibernation)} ++.B libretto-config ++{\-P (boot,hibernation)} ++{\-T (0,5,10,15,30,45,60,unlimit)} ++{\-a (disable,10,20,30,40,50,60)} ++{\-S (disable,enable)} ++{\-A (disable,<time>)} ++{\-L (0,1,2,3)} ++{\-V (0,1,2,3)} ++{\-O (suspend|hibernation)} + + .SH 説明 +-.B libapm ++.B libretto-config + は東芝Libretto のシステム設定を変更します。 + 変更は即座に反映されリブートの必要はありません。 + + .SH オプション + .TP +-.B \-P,\-\-PowerUp (boot,hibernation) ++.B \-P (boot,hibernation) + は ハイバネーション機能を設定します。 + hibernationを指定するとハイバネーション機能が有効になり、 + bootを指定するとそれが無効になります。 + .TP +-.B \-T,\-\-StandbyTime (0,5,10,15,30,45,60,unlimit) ++.B \-T (0,5,10,15,30,45,60,unlimit) + は、スタンバイ時間(単位は分)を設定します。 + スタンバイ時間とは、サスペンドによってハードディスクへの保存処理を + 終了した後、完全に電源を切るまでの時間です。 +@@ -40,43 +40,43 @@ + unlimit を指定した場合は、完全に電源を切らなくなります。 + この機能は、ハイバネーション機能が有効な場合のみ動作します。 + .TP +-.B \-a,\-\-AutoOff (disable,10,20,30,40,50,60) ++.B \-a (disable,10,20,30,40,50,60) + システム自動オフ時間(単位は分)を設定します。 + 指定できる時間は disable,10,20,30,40,50,60 です. + この機能は、ハイバネーション機能が有効な場合のみ動作します。 + .TP +-.B \-S,\-\-PanelSwitch (disable,enable) ++.B \-S (disable,enable) + は、パネルを閉じたときにハイバネーションし、開いたときにレジュームする + パネルスイッチの機能を設定します。 + enable を指定するとパネルスイッチの機能が有効になり、 + disable を指定するとその機能は無効になります。 + この機能はハイバネーション機能が有効な場合のみ動作します。 + .TP +-.B \-A,\-\-AlarmOn (disable,<time>) ++.B \-A (disable,<time>) + は、タイマオン機能を設定します。 + <time> として hh:mm の形で時刻を与えると、その時刻に自動的に電源が入り + ます。disable を指定するとその機能が無効になります。 + .TP +-.B \-L,\-\-LcdPower (0,1,2,3) ++.B \-L (0,1,2,3) + は、LCD の輝度を設定します。 + 0,1,2,3 の値が指定できます。 + 0 が最も暗く、数字が大きくなるに従い、 + より明るくなります。 + .TP +-.B \-V,\-\-Volume (0,1,2,3) ++.B \-V (0,1,2,3) + は、ビープ音の設定をします。 + 0,1,2,3 の値が指定できます。 + 0でオフ、1が最も小さな音で、数字が大きくなるに従い、 + より大きな音になります。 + .TP +-.B \-O,\-\-Off (suspend|hibernation) ++.B \-O (suspend|hibernation) + 電源を切るときに suspend状態にするか、ハイバネーション機能を使うかを + 設定します。このオプションは Libretto100以降の機種のみで有効です。 + .TP +-.B \-v,\-\-Version ++.B \-v + バージョンを表示して終了します。 + .TP +-.B \-h,\-\-Help ++.B \-h + 簡単なヘルプを表示して終了します。 + + .SH バグ Copied: head/sysutils/libretto-config/files/patch-libapm.c (from r364266, head/sysutils/libretto-config/files/patch-ab) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/libretto-config/files/patch-libapm.c Thu Aug 7 15:31:22 2014 (r364290, copy of r364266, head/sysutils/libretto-config/files/patch-ab) @@ -0,0 +1,207 @@ + +$FreeBSD$ + +--- libapm.c.orig Fri Jun 19 02:28:23 1998 ++++ libapm.c Sun Aug 22 23:31:55 2004 +@@ -8,12 +8,19 @@ + /* */ + /***********************************************************/ + ++#undef HAVE_GETOPT_LONG ++#ifdef __linux__ ++#define HAVE_GETOPT_LONG 1 ++#endif ++ + #include <stdio.h> + #include <stdlib.h> + #include <sys/types.h> + #include <string.h> + #include <ctype.h> ++#ifdef HAVE_GETOPT_LONG + #include <getopt.h> ++#endif + #include <fcntl.h> + #include <unistd.h> + #include <sys/mman.h> +@@ -63,6 +70,7 @@ + int r; + char c; + ++#ifdef HAVE_GETOPT_LONG + struct option longopts[] = { + { "Help", 0, 0, 'h' }, + { "Version", 0, 0, 'v' }, +@@ -78,6 +86,7 @@ + #endif /* CMOS_ACCESS */ + {0, 0, 0, 0} + }; ++#endif + + if( 0 != geteuid() ){ + printf("%s: Only root can execute !!\n", argv[0]); +@@ -98,8 +107,12 @@ + + get_status(); + ++#ifdef HAVE_GETOPT_LONG + while ((c = getopt_long(argc,argv, + "hvP:T:a:S:A:L:V:O:", longopts, NULL)) != -1) { ++#else ++ while ((c = getopt(argc,argv, "hvP:T:a:S:A:L:V:O:")) != -1) { ++#endif + switch (c) { + case 'h': + usage(); +@@ -189,7 +202,7 @@ + case '?': + usage(); + break; +- default: ++ default: break; + } + } + #ifdef DEBUG +@@ -215,29 +228,60 @@ + void usage(void) + { + #ifdef CMOS_ACCESS +- printf(" +-usage: libapm [-v --Version] +- [-h --Help] +- [-P --PowerUp {boot,hibernation}] +- [-T --StandbyTime {0,5,10,15,30,45,60,unlimit}] +- [-a --AutoOff {disable,10,20,30,40,50,60}] +- [-S --PanelSwitch {disable,enable}] +- [-A --AlarmOn {disable,<time>}] +- [-L --LcdPower {0,1,2,3}] ++# ifdef HAVE_GETOPT_LONG ++ printf("\n\ ++usage: libretto-config [-v --Version]\n\ ++ [-h --Help]\n\ ++ [-P --PowerUp {boot,hibernation}]\n\ ++ [-T --StandbyTime {0,5,10,15,30,45,60,unlimit}]\n\ ++ [-a --AutoOff {disable,10,20,30,40,50,60}]\n\ ++ [-S --PanelSwitch {disable,enable}]\n\ ++ [-A --AlarmOn {disable,<time>}]\n\ ++ [-L --LcdPower {0,1,2,3}]\n\ + \n"); +-#else +- printf(" +-usage: libapm [-v --Version] +- [-h --Help] +- [-P --PowerUp {boot,hibernation}] +- [-T --StandbyTime {0,5,10,15,30,45,60,unlimit}] +- [-a --AutoOff {disable,10,20,30,40,50,60}] +- [-S --PanelSwitch {disable,enable}] +- [-A --AlarmOn {disable,<time>}] +- [-L --LcdPower {0,1,2,3}] +- [-V --Volume {0,1,2,3}] +- [-O --Off {suspend|hibernation} Use Only >= Libretto100] ++# else /* not HAVE_GETOPT_LONG */ ++ printf("\n\ ++usage: libretto-config [-v : Version]\n\ ++ [-h : Help]\n\ ++ [-P {boot,hibernation} : PowerUp]\n\ ++ [-T {0,5,10,15,30,45,60,unlimit} : StandbyTime]\n\ ++ [-a {disable,10,20,30,40,50,60} : AutoOff]\n\ ++ [-S {disable,enable} : PanelSwitch]\n\ ++ [-A {disable,<time>} : AlarmOn]\n\ ++ [-L {0,1,2,3} : LcdPower]\n\ ++ \n"); ++# endif /* HAVE_GETOPT_LONG */ ++ ++#else /* not CMOS_ACCESS */ ++ ++# ifdef HAVE_GETOPT_LONG ++ printf("\ ++usage: libretto-config [-v --Version]\n\ ++ [-h --Help]\n\ ++ [-P --PowerUp {boot,hibernation}]\n\ ++ [-T --StandbyTime {0,5,10,15,30,45,60,unlimit}]\n\ ++ [-a --AutoOff {disable,10,20,30,40,50,60}]\n\ ++ [-S --PanelSwitch {disable,enable}]\n\ ++ [-A --AlarmOn {disable,<time>}]\n\ ++ [-L --LcdPower {0,1,2,3}]\n\ ++ [-V --Volume {0,1,2,3}]\n\ ++ [-O --Off {suspend|hibernation} Use Only >= Libretto100]\n\ + \n"); ++# else /* not HAVE_GETOPT_LONG */ ++ printf("\ ++usage: libretto-config [-v : Version]\n\ ++ [-h : Help]\n\ ++ [-P {boot,hibernation} : PowerUp]\n\ ++ [-T {0,5,10,15,30,45,60,unlimit} : StandbyTime]\n\ ++ [-a {disable,10,20,30,40,50,60} : AutoOff]\n\ ++ [-S {disable,enable} : PanelSwitch]\n\ ++ [-A {disable,<time>} : AlarmOn]\n\ ++ [-L {0,1,2,3} : LcdPower]\n\ ++ [-V {0,1,2,3} : Volume]\n\ ++ [-O {suspend|hibernation} : Off (Use Only>=Libretto100)]\n\ ++ \n"); ++# endif /* HAVE_GETOPT_LONG */ ++ + #endif /* CMOS_ACCESS */ + exit(1); + } +@@ -246,7 +290,11 @@ + void init(void) + { + /* SMI port */ ++#ifdef __linux__ + ioperm(0xb2, 1, 1); ++#else ++ open("/dev/io", O_RDWR, 0); ++#endif + } + #endif /* CMOS_ACCESS */ + +@@ -754,29 +802,29 @@ + #endif /* CMOS_ACCESS */ + + #ifndef CMOS_ACCESS +- printf(" +-Power Management for Libretto V%-8s +-+-----------------------------------------------------------+ +-| 0) Power-up Mode : %-32s| +-| 1) Standby Time : %-32s| +-| 2) System Auto Off : %-32s| +-| 3) Panel Power On/Off : %-32s| +-| 4) Alarm Power On : %-32s| +-| 5) LCD Power : %-32s| +-| 6) Volume : %-32s| +-| 7) Off (Suspend/Hiber): %-32s| ++ printf("\ ++Power Management for Libretto V%-8s\n\ +++-----------------------------------------------------------+\n\ ++| 0) Power-up Mode : %-32s|\n\ ++| 1) Standby Time : %-32s|\n\ ++| 2) System Auto Off : %-32s|\n\ ++| 3) Panel Power On/Off : %-32s|\n\ ++| 4) Alarm Power On : %-32s|\n\ ++| 5) LCD Power : %-32s|\n\ ++| 6) Volume : %-32s|\n\ ++| 7) Off (Suspend/Hiber): %-32s|\n\ + +-----------------------------------------------------------+\n\n", + version, s[0], s[1], s[2], s[3], s[4], s[5], s[6], s[7]); + #else +- printf(" +-Power Management for Libretto V%-8s +-+-----------------------------------------------------------+ +-| 0) Power-up Mode : %-32s| +-| 1) Standby Time : %-32s| +-| 2) System Auto Off : %-32s| +-| 3) Panel Power On/Off : %-32s| +-| 4) Alarm Power On : %-32s| +-| 5) LCD Power : %-32s| ++ printf("\ ++Power Management for Libretto V%-8s\n\ +++-----------------------------------------------------------+\n\ ++| 0) Power-up Mode : %-32s|\n\ ++| 1) Standby Time : %-32s|\n\ ++| 2) System Auto Off : %-32s|\n\ ++| 3) Panel Power On/Off : %-32s|\n\ ++| 4) Alarm Power On : %-32s|\n\ ++| 5) LCD Power : %-32s|\n\ + +-----------------------------------------------------------+\n\n", + version, s[0], s[1], s[2], s[3], s[4], s[5]); + #endif /* CMOS_ACCESS */ Copied: head/sysutils/libretto-config/files/patch-libapm.h (from r364266, head/sysutils/libretto-config/files/patch-ac) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/libretto-config/files/patch-libapm.h Thu Aug 7 15:31:22 2014 (r364290, copy of r364266, head/sysutils/libretto-config/files/patch-ac) @@ -0,0 +1,48 @@ +diff -urN libapm.h.orig libapm.h +--- libapm.h.orig Tue May 12 11:05:49 1998 ++++ libapm.h Thu Nov 19 13:02:03 1998 +@@ -32,34 +32,44 @@ + #define outb(port, value) port_out(value, port) + #define outw(port, value) port_outw(value, port) + ++#ifdef __linux__ + int io_enable(void) + { + ioperm(0x70, 1, 1); + ioperm(0x71, 1, 1); + return 0; + } ++#endif + ++#ifdef __linux__ + int io_disable(void) + { + ioperm(0x70, 0, 1); + ioperm(0x71, 0, 1); + return 0; + } ++#endif + + int get_cmos(int index) + { + int r; + ++#ifdef __linux__ + io_enable(); ++#endif + outb(0x70, index); + r = inb(0x71); ++#ifdef __linux__ + io_disable(); ++#endif + return r; + } + + int set_cmos(int index, int value) + { ++#ifdef __linux__ + io_enable(); ++#endif + outb(0x70, index); + outb(0x71, value); + return 0;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53e39bcb.597a.750c91c6>