Index: head/games/Makefile =================================================================== --- head/games/Makefile (revision 440513) +++ head/games/Makefile (revision 440514) @@ -1,1196 +1,1200 @@ # $FreeBSD$ # COMMENT = Games and related software SUBDIR += 0ad SUBDIR += 0verkill SUBDIR += 2048 SUBDIR += 2048-qt SUBDIR += 3dc SUBDIR += 3dpong SUBDIR += 3omns SUBDIR += 4stattack SUBDIR += 54321 SUBDIR += 7kaa SUBDIR += 90secondportraits SUBDIR += CaribbeanStud SUBDIR += HeroesOfMightAndMagic SUBDIR += KnightCap SUBDIR += abbayedesmorts SUBDIR += abe SUBDIR += abuse_sdl SUBDIR += ace-of-penguins SUBDIR += acm SUBDIR += adgali SUBDIR += adom SUBDIR += adonthell SUBDIR += aestats SUBDIR += affenspiel SUBDIR += afternoonstalker SUBDIR += agame SUBDIR += ags SUBDIR += aisleriot SUBDIR += alephone SUBDIR += alephone-data SUBDIR += alephone-scenarios SUBDIR += alex4 SUBDIR += alienarena SUBDIR += alienarena-data SUBDIR += alienblaster SUBDIR += alienwave SUBDIR += allacrost SUBDIR += amoebax SUBDIR += an SUBDIR += angband SUBDIR += anki SUBDIR += antipolix SUBDIR += aop SUBDIR += apoolGL SUBDIR += apricots SUBDIR += aquaria SUBDIR += arkanoidsb SUBDIR += armagetron SUBDIR += arx-libertatis SUBDIR += asc SUBDIR += ascii-invaders SUBDIR += asciiquarium SUBDIR += assaultcube SUBDIR += asteroid SUBDIR += asteroids3d SUBDIR += asylum SUBDIR += atanks SUBDIR += atomix SUBDIR += atr3d SUBDIR += atris SUBDIR += atris-sounds SUBDIR += avanor SUBDIR += avoision SUBDIR += awale SUBDIR += awele SUBDIR += balazar SUBDIR += balazarbrothers SUBDIR += banihstypos SUBDIR += barbie_seahorse_adventures SUBDIR += barrage SUBDIR += bass SUBDIR += bastet SUBDIR += battalion SUBDIR += battletanks SUBDIR += belooted SUBDIR += beret SUBDIR += billardgl SUBDIR += biloba SUBDIR += biniax2 SUBDIR += biorythm SUBDIR += bitefusion SUBDIR += black-box SUBDIR += blackjackclient SUBDIR += blackshadeselite SUBDIR += blinken SUBDIR += blinkensisters SUBDIR += blobby SUBDIR += bloboats SUBDIR += blobwars SUBDIR += block SUBDIR += blockade SUBDIR += blockout SUBDIR += blockrage SUBDIR += blokish SUBDIR += bloodfrontier SUBDIR += bluemoon SUBDIR += bogged SUBDIR += bomber SUBDIR += bomberclone SUBDIR += bomberinstinct SUBDIR += bombherman SUBDIR += bombz SUBDIR += bomns SUBDIR += boswars SUBDIR += bouncy SUBDIR += bovo SUBDIR += braincurses SUBDIR += brainparty SUBDIR += brainworkshop SUBDIR += brickout SUBDIR += brickshooter SUBDIR += brikx SUBDIR += briquolo SUBDIR += brumbrumrally SUBDIR += brutalchess SUBDIR += bs SUBDIR += bsdgames SUBDIR += bsdrain SUBDIR += bsdtris SUBDIR += bsp SUBDIR += bubble-chains SUBDIR += bubbros SUBDIR += bugsquish SUBDIR += bugsx SUBDIR += bumprace SUBDIR += bunnysay SUBDIR += burgerspace SUBDIR += burrtools SUBDIR += bygfoot SUBDIR += bzflag SUBDIR += bzflag-server SUBDIR += cake SUBDIR += caph SUBDIR += capicity SUBDIR += capitalism SUBDIR += cardpics SUBDIR += castlevox SUBDIR += cataclysm-dda SUBDIR += catesc SUBDIR += cave9 SUBDIR += cavezofphear SUBDIR += ceferino SUBDIR += cgoban SUBDIR += chanta SUBDIR += chapping SUBDIR += cheech SUBDIR += chessx SUBDIR += childsplay SUBDIR += chocolate-doom SUBDIR += chroma SUBDIR += chromium-bsu SUBDIR += circuslinux SUBDIR += cleanq3 SUBDIR += cockatrice SUBDIR += colorcode SUBDIR += columns SUBDIR += concentration SUBDIR += connectagram SUBDIR += connectfive SUBDIR += conquest SUBDIR += construo SUBDIR += corewars SUBDIR += corsix-th SUBDIR += cosmo SUBDIR += cosmosmash SUBDIR += cowsay SUBDIR += crack-attack SUBDIR += craft SUBDIR += crafty SUBDIR += crafty-open-enormous SUBDIR += crafty-open-large SUBDIR += crafty-open-medium SUBDIR += crafty-tablebase-no-pawn SUBDIR += crafty-tablebase-pawn SUBDIR += crashtest SUBDIR += cre SUBDIR += cretan-hubris SUBDIR += crimson SUBDIR += criticalmass SUBDIR += critterding SUBDIR += crossfire-client SUBDIR += crossfire-server SUBDIR += crrcsim SUBDIR += cryptoslam SUBDIR += csmash SUBDIR += ctris SUBDIR += cube SUBDIR += cultivation SUBDIR += cursive SUBDIR += cutemaze SUBDIR += cuyo SUBDIR += d2x SUBDIR += d2x-xl SUBDIR += dangen SUBDIR += dangerdeep SUBDIR += dangerdeep-data SUBDIR += darkplaces SUBDIR += defendguin SUBDIR += dhewm3 SUBDIR += diameter SUBDIR += diaspora SUBDIR += digger-vgl SUBDIR += divide-and-succeed SUBDIR += dmjava SUBDIR += dodgindiamond2 SUBDIR += domination SUBDIR += dontspace SUBDIR += doom SUBDIR += doom-data SUBDIR += doom-freedoom SUBDIR += doom-hacx SUBDIR += doom-hr SUBDIR += doom-hr2 SUBDIR += doom-wolfendoom SUBDIR += doomlegacy SUBDIR += doomsday SUBDIR += dopewars SUBDIR += drcreep SUBDIR += drm SUBDIR += duckmaze SUBDIR += duel SUBDIR += dunelegacy SUBDIR += dungeon SUBDIR += dungeoncrawl SUBDIR += dustrac SUBDIR += easyrpg-player SUBDIR += eboard SUBDIR += edge SUBDIR += editss SUBDIR += eduke32 SUBDIR += egl SUBDIR += egoboo SUBDIR += eif SUBDIR += eights SUBDIR += einstein SUBDIR += el SUBDIR += el-data SUBDIR += ember SUBDIR += emptyepsilon SUBDIR += endgame-singularity SUBDIR += endgame-singularity-music SUBDIR += endless-sky SUBDIR += endless-sky-high-dpi SUBDIR += enigma SUBDIR += ensemblist SUBDIR += entombed SUBDIR += enygma SUBDIR += epiar SUBDIR += etracer SUBDIR += euchre SUBDIR += evilfinder SUBDIR += evq3 SUBDIR += excido SUBDIR += exhaust SUBDIR += exhaust-doc SUBDIR += exhaust-ma SUBDIR += exmars SUBDIR += exult SUBDIR += ezquake SUBDIR += f1spirit-remake SUBDIR += fairymax SUBDIR += falconseye SUBDIR += farblazer SUBDIR += fargoal SUBDIR += fbg2 SUBDIR += fightorperish SUBDIR += fillets-ng SUBDIR += filters SUBDIR += fishsupper SUBDIR += five-or-more SUBDIR += fkiss SUBDIR += flare-engine SUBDIR += flare-game SUBDIR += flightgear SUBDIR += flightgear-aircraft SUBDIR += flightgear-data SUBDIR += flightgear-mb339-pan SUBDIR += flobopuyo SUBDIR += flukz SUBDIR += flyhard SUBDIR += flying SUBDIR += fmars SUBDIR += foobillard SUBDIR += formido SUBDIR += fortunate SUBDIR += fotaq SUBDIR += four-in-a-row SUBDIR += freeblocks SUBDIR += freecell-solver SUBDIR += freeciv SUBDIR += freeciv-nox11 SUBDIR += freeciv-sounds SUBDIR += freecol SUBDIR += freedink SUBDIR += freedink-data SUBDIR += freedink-dfarc SUBDIR += freedink-engine SUBDIR += freedoko SUBDIR += freedroid SUBDIR += freedroidrpg SUBDIR += freeminer SUBDIR += freeminer-default SUBDIR += freera SUBDIR += freesweep SUBDIR += freesynd SUBDIR += freetennis SUBDIR += fretsonfire SUBDIR += fretsonfire-data SUBDIR += frikqcc SUBDIR += frobtads SUBDIR += frogatto SUBDIR += frotz SUBDIR += frozen-bubble SUBDIR += fteqw SUBDIR += funnyboat SUBDIR += galaxis SUBDIR += galaxyhack SUBDIR += garden-of-coloured-lights SUBDIR += garith SUBDIR += gbottler SUBDIR += gbrainy SUBDIR += gcompris SUBDIR += gdado SUBDIR += gemdropx SUBDIR += gemrb SUBDIR += ggz-client-libs SUBDIR += ggz-gtk-client SUBDIR += ggz-gtk-games SUBDIR += ggz-sdl-games SUBDIR += ggz-txt-client SUBDIR += gigalomania SUBDIR += gillo SUBDIR += gish-demo SUBDIR += gl-117 SUBDIR += glaxium SUBDIR += glbsp SUBDIR += glchess SUBDIR += glest SUBDIR += glest-data SUBDIR += glightoff SUBDIR += glmaze SUBDIR += glob2 SUBDIR += glsfcave SUBDIR += gltron SUBDIR += gmastermind SUBDIR += gmines SUBDIR += gnake SUBDIR += gnarr SUBDIR += gnome-2048 SUBDIR += gnome-chess SUBDIR += gnome-games SUBDIR += gnome-klotski SUBDIR += gnome-mahjongg SUBDIR += gnome-mines SUBDIR += gnome-nibbles SUBDIR += gnome-robots SUBDIR += gnome-sudoku SUBDIR += gnome-taquin SUBDIR += gnome-tetravex SUBDIR += gnomeattacks SUBDIR += gnomebreakout SUBDIR += gnomekiss SUBDIR += gnono SUBDIR += gnubg SUBDIR += gnubik SUBDIR += gnuchess SUBDIR += gnudoku SUBDIR += gnugo SUBDIR += gnujump SUBDIR += gnurobbo SUBDIR += gnurobots SUBDIR += gnushogi SUBDIR += gnustep-ladder SUBDIR += gnustep-sudoku SUBDIR += gogrepo SUBDIR += golddig SUBDIR += goldencheetah SUBDIR += golly SUBDIR += gomoku SUBDIR += gondola SUBDIR += goonies SUBDIR += gottet SUBDIR += gracer SUBDIR += granatier SUBDIR += greed SUBDIR += gretools SUBDIR += grhino SUBDIR += griels-quest SUBDIR += gru SUBDIR += grubik SUBDIR += gshisen SUBDIR += gtetrinet SUBDIR += gti SUBDIR += gtkatlantic SUBDIR += gtkballs SUBDIR += gtkevemon SUBDIR += gtklife SUBDIR += gtkpool SUBDIR += gtkradiant SUBDIR += gtktetcolor SUBDIR += gturing SUBDIR += gtypist SUBDIR += gunfudeadlands SUBDIR += hangman SUBDIR += hedgewars SUBDIR += help_hannahs_horse SUBDIR += heretic SUBDIR += heroes SUBDIR += hex-a-hop SUBDIR += hexalate SUBDIR += hexxagon SUBDIR += highmoon SUBDIR += hinversi SUBDIR += hitori SUBDIR += hllib SUBDIR += hohlin SUBDIR += hoichess SUBDIR += holotz-castle SUBDIR += hoverboard-sdl SUBDIR += hs-scroll SUBDIR += hypatia_engine SUBDIR += hyperrogue SUBDIR += iagno SUBDIR += icbm3d SUBDIR += icebreaker SUBDIR += iceicepenguin SUBDIR += ifm SUBDIR += imaze SUBDIR += impossible_mission_puzzle SUBDIR += inform SUBDIR += inform7 SUBDIR += instead SUBDIR += interlogic SUBDIR += ioquake3 SUBDIR += ioquake3-devel SUBDIR += ioquake3-devel-server SUBDIR += ioquake3-server SUBDIR += iortcw SUBDIR += iourbanterror SUBDIR += iourbanterror-server SUBDIR += irrlamb SUBDIR += ishido SUBDIR += ivan SUBDIR += jag SUBDIR += jaggedalliance2 SUBDIR += java-games-suite SUBDIR += jchessboard SUBDIR += jfk SUBDIR += jfsw SUBDIR += jigsaw SUBDIR += jigzo SUBDIR += jin SUBDIR += jinput SUBDIR += joequake SUBDIR += jools SUBDIR += jtans SUBDIR += jutils SUBDIR += jvgs SUBDIR += jzip SUBDIR += kajaani-kombat SUBDIR += kajongg SUBDIR += kanagram SUBDIR += kapman SUBDIR += kardsgt SUBDIR += kartofel SUBDIR += katawa-shoujo SUBDIR += katomic SUBDIR += kblackbox SUBDIR += kblocks SUBDIR += kbounce SUBDIR += kbreakout SUBDIR += kcheckers SUBDIR += kdegames4 SUBDIR += kdiamond SUBDIR += kevedit SUBDIR += kfourinline SUBDIR += kgoldrunner SUBDIR += khangman SUBDIR += kigo SUBDIR += kiki SUBDIR += killbots SUBDIR += kiriki SUBDIR += kjumpingcube SUBDIR += klavaro SUBDIR += klickety SUBDIR += klines SUBDIR += klondike SUBDIR += kmahjongg SUBDIR += kmines SUBDIR += knavalbattle SUBDIR += knetwalk SUBDIR += knights-kde4 SUBDIR += kobodeluxe SUBDIR += kolf SUBDIR += kollision SUBDIR += konquest SUBDIR += kpat SUBDIR += krank SUBDIR += kreversi SUBDIR += kshisen SUBDIR += ksirk SUBDIR += ksnakeduel SUBDIR += kspaceduel SUBDIR += ksquares SUBDIR += ksudoku SUBDIR += ktuberling SUBDIR += kubrick SUBDIR += kuklomenos SUBDIR += kye SUBDIR += ladder SUBDIR += lander SUBDIR += lapispuzzle SUBDIR += lbreakout SUBDIR += lbreakout2 SUBDIR += ldmud SUBDIR += legend-of-edgar SUBDIR += legends SUBDIR += legesmotus SUBDIR += lexter SUBDIR += lgeneral SUBDIR += lianliankan SUBDIR += libdungeonmaker SUBDIR += libgames-support SUBDIR += libggz SUBDIR += libgnome-games-support SUBDIR += libkdegames SUBDIR += libkmahjongg SUBDIR += liblcf SUBDIR += libmaitretarot SUBDIR += libmt_client SUBDIR += libretro-cores SUBDIR += libshhcards SUBDIR += lightsoff SUBDIR += lincity SUBDIR += lincity-ng SUBDIR += linux-darwinia-demo SUBDIR += linux-defcon SUBDIR += linux-doom3 SUBDIR += linux-doom3-demo SUBDIR += linux-dwarffortress SUBDIR += linux-enemyterritory SUBDIR += linux-enemyterritory-etpro SUBDIR += linux-enemyterritory-jaymod SUBDIR += linux-enemyterritory-jaymod-21 SUBDIR += linux-enemyterritory-omni-bot SUBDIR += linux-enemyterritory-omni-bot-0660 SUBDIR += linux-enemyterritory-shrub SUBDIR += linux-enemyterritory-tce SUBDIR += linux-etqw-demo-server SUBDIR += linux-etqw-server SUBDIR += linux-nerogame SUBDIR += linux-nwnclient SUBDIR += linux-quake3 SUBDIR += linux-quake3-demo SUBDIR += linux-quake4 SUBDIR += linux-quake4-demo SUBDIR += linux-rtcw SUBDIR += linux-ssamtfe SUBDIR += linux-ssamtse SUBDIR += linux-unigine-heaven SUBDIR += linux-unigine-valley SUBDIR += linux-unrealgold SUBDIR += linux-uplink-demo SUBDIR += linux-ut SUBDIR += linux-ut2003-demo SUBDIR += linux-virtual-jay-peak SUBDIR += linux-worldofgoo-demo SUBDIR += linwarrior SUBDIR += liquidwar SUBDIR += lm-solve SUBDIR += lmarbles SUBDIR += lmpc SUBDIR += lolcat SUBDIR += lordsawar SUBDIR += lpairs SUBDIR += lskat SUBDIR += ltris SUBDIR += lugaru SUBDIR += luola SUBDIR += lwjgl SUBDIR += macopix SUBDIR += madbomber SUBDIR += maelstrom SUBDIR += magiccube4d SUBDIR += magicmaze SUBDIR += magicor SUBDIR += mahjong SUBDIR += maitretarot SUBDIR += manaplus SUBDIR += mangband SUBDIR += mari0 SUBDIR += marsnomercy SUBDIR += masterserver SUBDIR += maxr SUBDIR += meandmyshadow SUBDIR += megaglest SUBDIR += megaglest-data SUBDIR += megamario SUBDIR += memonix SUBDIR += meqcc SUBDIR += meritous SUBDIR += mindfocus SUBDIR += mindguard SUBDIR += minecraft-client SUBDIR += minecraft-server SUBDIR += minerbold SUBDIR += minetest SUBDIR += minetest_game SUBDIR += mirrormagic SUBDIR += miscom SUBDIR += mkgichessclub SUBDIR += mkhexgrid SUBDIR += moagg SUBDIR += monkeybubble SUBDIR += monster-masher SUBDIR += monsterz SUBDIR += moon-buggy SUBDIR += moonlander SUBDIR += mopesnake SUBDIR += moria SUBDIR += motogt SUBDIR += mt_dolphin_ia SUBDIR += mt_gtk_client SUBDIR += mtaserver SUBDIR += mudmagic SUBDIR += mvdsv SUBDIR += nInvaders SUBDIR += nadar SUBDIR += naev SUBDIR += naev-data SUBDIR += narcissu2 SUBDIR += nazghul SUBDIR += nehquake SUBDIR += nelly SUBDIR += nethack32 SUBDIR += nethack33 SUBDIR += nethack33-nox11 SUBDIR += nethack34 SUBDIR += nethack34-nox11 SUBDIR += nethack36 SUBDIR += nethack36-nox11 SUBDIR += netherearth SUBDIR += netpanzer SUBDIR += netradiant SUBDIR += netrek-BRMH-bin SUBDIR += netrek-client-cow SUBDIR += netspades SUBDIR += nettoe SUBDIR += netwalk SUBDIR += neverball SUBDIR += newvox SUBDIR += nextgo SUBDIR += nexuiz SUBDIR += nighthawk SUBDIR += nimuh SUBDIR += ninix-aya SUBDIR += njam SUBDIR += nlarn SUBDIR += noegnud-data SUBDIR += nonsense SUBDIR += npush SUBDIR += nsnake SUBDIR += nuclearchess SUBDIR += numptyphysics SUBDIR += numptyphysics-npcomplete SUBDIR += nwndata SUBDIR += odamex SUBDIR += oldrunner SUBDIR += omega SUBDIR += oneisenough SUBDIR += oneko SUBDIR += oneko-sakura SUBDIR += oolite SUBDIR += oonsoo SUBDIR += openalchemist SUBDIR += openarena SUBDIR += openarena-data SUBDIR += openarena-oax SUBDIR += openarena-server SUBDIR += openastromenace SUBDIR += openbor + SUBDIR += openbor3482 + SUBDIR += openbor3711 + SUBDIR += openbor3979 + SUBDIR += openbor4432 SUBDIR += openbubbles SUBDIR += opencity SUBDIR += openclonk SUBDIR += opengfx SUBDIR += openglad SUBDIR += openjazz SUBDIR += openlierox SUBDIR += openmortal SUBDIR += openmsx SUBDIR += openmw SUBDIR += openomf SUBDIR += openpref SUBDIR += openra SUBDIR += opensfx SUBDIR += opensonic SUBDIR += openspades SUBDIR += openssn SUBDIR += opensurge SUBDIR += openttd SUBDIR += opentyrian SUBDIR += openxcom SUBDIR += openyahtzee SUBDIR += optimax SUBDIR += orbital_eunuchs_sniper SUBDIR += osgg SUBDIR += outerspace SUBDIR += p5-Acme-GuessNumber SUBDIR += p5-Algorithm-Pair-Best2 SUBDIR += p5-Algorithm-Pair-Swiss SUBDIR += p5-Baseball-Sabermetrics SUBDIR += p5-Games-Alak SUBDIR += p5-Games-AlphaBeta SUBDIR += p5-Games-Bingo SUBDIR += p5-Games-Bingo-Bot SUBDIR += p5-Games-Bingo-Print SUBDIR += p5-Games-Dice SUBDIR += p5-Games-GuessWord SUBDIR += p5-Games-Tournament-RoundRobin SUBDIR += pachi SUBDIR += pacmanarena SUBDIR += paintown SUBDIR += pairs SUBDIR += palapeli SUBDIR += palomino SUBDIR += pangzero SUBDIR += passage SUBDIR += patapizza-tetris SUBDIR += pathological SUBDIR += pcgen SUBDIR += pear-Games_Chess SUBDIR += peg-e SUBDIR += pengpong SUBDIR += penguin-command SUBDIR += pengupop SUBDIR += phalanx SUBDIR += phlipple SUBDIR += picmi SUBDIR += pinball SUBDIR += pingus SUBDIR += pink-pony SUBDIR += pioneer SUBDIR += pioneers SUBDIR += pipenightdreams SUBDIR += pipepanic SUBDIR += pipewalker SUBDIR += plee-the-bear SUBDIR += plutocracy SUBDIR += pmars SUBDIR += pmars-sdl SUBDIR += poker-engine SUBDIR += poker-eval SUBDIR += pokerth SUBDIR += polyglot SUBDIR += polypuzzle SUBDIR += pongix SUBDIR += popstar SUBDIR += pouetchess SUBDIR += powder SUBDIR += powder-toy SUBDIR += powermanga SUBDIR += powwow SUBDIR += ppracer SUBDIR += prboom SUBDIR += prboom-plus SUBDIR += primateplunge SUBDIR += ptkei SUBDIR += ptools SUBDIR += puckman SUBDIR += pushover SUBDIR += pvpgn SUBDIR += py-fife SUBDIR += py-mnemosyne SUBDIR += py-poker-eval SUBDIR += py-sgflib SUBDIR += py-sgfsummary SUBDIR += pyawale SUBDIR += pycadia SUBDIR += pydance SUBDIR += pyfa SUBDIR += pykawari SUBDIR += pysolfc SUBDIR += pyspacewar SUBDIR += pysycache SUBDIR += pysycache-lang SUBDIR += pythonchess SUBDIR += pythonsudoku SUBDIR += pytowerdefense SUBDIR += q2p SUBDIR += q2pro SUBDIR += q3cellshading SUBDIR += qcc SUBDIR += qccx SUBDIR += qgo SUBDIR += qmars SUBDIR += qnetwalk SUBDIR += qonk SUBDIR += qqwing SUBDIR += qstat SUBDIR += qtads SUBDIR += quackle SUBDIR += quadra SUBDIR += quadrapassel SUBDIR += quake-data SUBDIR += quake-dpmod SUBDIR += quake-reaper SUBDIR += quake-source SUBDIR += quake2-3zb2 SUBDIR += quake2-ctf SUBDIR += quake2-data SUBDIR += quake2-extras SUBDIR += quake2-lights SUBDIR += quake2-matrix SUBDIR += quake2-psychomod SUBDIR += quake2-relay SUBDIR += quake2-rogue SUBDIR += quake2-source SUBDIR += quake2-xatrix SUBDIR += quake2lnx SUBDIR += quake2max SUBDIR += quake3 SUBDIR += quake3-data SUBDIR += quake3-excessive SUBDIR += quake3-osp SUBDIR += quake3-ra3 SUBDIR += quake3-ut SUBDIR += quake3-wfa SUBDIR += quakeforge SUBDIR += quantumminigolf SUBDIR += quaqut SUBDIR += qudos SUBDIR += quetoo SUBDIR += quit SUBDIR += qwdtools SUBDIR += r1q2 SUBDIR += railroad-rampage SUBDIR += redeclipse SUBDIR += redeclipse-data SUBDIR += redorblack SUBDIR += reminiscence SUBDIR += rescue SUBDIR += residualvm SUBDIR += retroarch SUBDIR += rezerwar SUBDIR += rfksay SUBDIR += ri-li SUBDIR += rnd_jue SUBDIR += robocode SUBDIR += robocode-naval SUBDIR += robotfindskitten SUBDIR += rockdodger SUBDIR += rocksndiamonds SUBDIR += rocksndiamonds-data SUBDIR += rottdc SUBDIR += rtb SUBDIR += rubix SUBDIR += rubygem-fortune_gem SUBDIR += sampsvr SUBDIR += sarien SUBDIR += sauerbraten SUBDIR += scare SUBDIR += schiff SUBDIR += schwarzweiss SUBDIR += scid SUBDIR += scorched3d SUBDIR += scourge SUBDIR += scourge-data SUBDIR += scramble SUBDIR += scummvm SUBDIR += scummvm-tools SUBDIR += sdb SUBDIR += sdl-ball SUBDIR += sdlCC SUBDIR += sdl_jewels SUBDIR += sdl_lopan SUBDIR += sdl_scavenger SUBDIR += sdlroids SUBDIR += sdlsand SUBDIR += sea-defender SUBDIR += seabattle SUBDIR += seahaven SUBDIR += searchandrescue SUBDIR += searchandrescue-data SUBDIR += secrettower SUBDIR += senken SUBDIR += sets SUBDIR += sex SUBDIR += sgt-puzzles SUBDIR += shaaft SUBDIR += shootingstar SUBDIR += simplevaders SUBDIR += simsu SUBDIR += simutrans SUBDIR += sjeng SUBDIR += ski SUBDIR += sl SUBDIR += slade SUBDIR += slashem-tty SUBDIR += slump SUBDIR += slune SUBDIR += smashbattle SUBDIR += sokoban SUBDIR += sol SUBDIR += solarconquest SUBDIR += solarus SUBDIR += solarus-quest-editor SUBDIR += solarwolf SUBDIR += sopwith SUBDIR += spacejunk SUBDIR += speak SUBDIR += species SUBDIR += spellathon SUBDIR += spellcast SUBDIR += speyes SUBDIR += spicetrade SUBDIR += spider SUBDIR += spring SUBDIR += springlobby SUBDIR += starfighter SUBDIR += starlanes SUBDIR += steelstorm SUBDIR += stendhal SUBDIR += stepmania-devel SUBDIR += stockfish SUBDIR += stonesoup SUBDIR += stonesoup-sdl SUBDIR += stormbaancoureur SUBDIR += stransball2 SUBDIR += stratagus SUBDIR += sudoku-sensei SUBDIR += sudoku_solver SUBDIR += sudsol SUBDIR += super_mario_bros_python SUBDIR += super_methane_brothers SUBDIR += supertux SUBDIR += supertux2 SUBDIR += supertuxkart SUBDIR += swell-foop SUBDIR += sxsame SUBDIR += syobon SUBDIR += tads SUBDIR += taipan SUBDIR += tali SUBDIR += tanglet SUBDIR += tanks-of-freedom SUBDIR += tbclock SUBDIR += tbe SUBDIR += tecnoballz SUBDIR += teeworlds SUBDIR += teg SUBDIR += tenebrae SUBDIR += tesseract SUBDIR += tesseract-data SUBDIR += tetrinet SUBDIR += tetrinet-x SUBDIR += tetrons SUBDIR += tetzle SUBDIR += textmaze SUBDIR += thegrind SUBDIR += thudboard SUBDIR += tileworld SUBDIR += timeseal SUBDIR += tinymux SUBDIR += tkmoo SUBDIR += tksol SUBDIR += tomatoes SUBDIR += tome4 SUBDIR += tomenet SUBDIR += tong SUBDIR += toppler SUBDIR += torcs SUBDIR += tornado SUBDIR += torrent SUBDIR += toycars SUBDIR += trackballs SUBDIR += tractorgen SUBDIR += traindirector SUBDIR += traingame SUBDIR += tremulous SUBDIR += trenchbroom SUBDIR += trigger-rally SUBDIR += trimines SUBDIR += triplane SUBDIR += trojka SUBDIR += trophy SUBDIR += tsito SUBDIR += tt SUBDIR += ttraffic SUBDIR += ttt SUBDIR += tux-aqfh SUBDIR += tuxfighter SUBDIR += tuxkart SUBDIR += tuxmath SUBDIR += tuxpaint SUBDIR += tuxpaint-config SUBDIR += tuxpaint-fonts SUBDIR += tuxpaint-stamps SUBDIR += tuxpuck SUBDIR += tuxracer SUBDIR += tuxtype SUBDIR += twind SUBDIR += twitch SUBDIR += tycho SUBDIR += typespeed SUBDIR += tyrian-data SUBDIR += ufoai SUBDIR += ufoai-data SUBDIR += uhexen SUBDIR += uhexen2 SUBDIR += uhexen2-extras SUBDIR += ultimatestunts SUBDIR += umark SUBDIR += unknown-horizons SUBDIR += unnethack SUBDIR += untahris SUBDIR += uqm SUBDIR += urbanterror-data SUBDIR += valyriatear SUBDIR += vamos SUBDIR += vavoom SUBDIR += vavoom-extras SUBDIR += vectoroids SUBDIR += vegastrike SUBDIR += vegastrike-data SUBDIR += violetland SUBDIR += viruskiller SUBDIR += vitetris SUBDIR += vms-empire SUBDIR += vodovod SUBDIR += volleyball SUBDIR += vor SUBDIR += voxelands SUBDIR += voxelands-server SUBDIR += vultures-eye SUBDIR += wanderer SUBDIR += wargus SUBDIR += warmux SUBDIR += warsow SUBDIR += warsow-data SUBDIR += warzone2100 SUBDIR += wesnoth SUBDIR += whichwayisup SUBDIR += widelands SUBDIR += wizznic SUBDIR += wmeyes SUBDIR += wmpuzzle SUBDIR += wmqstat SUBDIR += wmquake SUBDIR += wmshuffle SUBDIR += wmtictactoe SUBDIR += wolfpack SUBDIR += wop SUBDIR += wordplay SUBDIR += wordwarvi SUBDIR += worldofpadman SUBDIR += wtf SUBDIR += wxlauncher SUBDIR += wyrmgus SUBDIR += wyrmsun SUBDIR += xabacus SUBDIR += xasteroids SUBDIR += xataxx SUBDIR += xbat SUBDIR += xbattle SUBDIR += xbill SUBDIR += xbl SUBDIR += xblackjack SUBDIR += xblast SUBDIR += xblood SUBDIR += xboard SUBDIR += xboard-devel SUBDIR += xboing SUBDIR += xbomb SUBDIR += xbubble SUBDIR += xchadance SUBDIR += xcheckers SUBDIR += xchomp SUBDIR += xconq SUBDIR += xcowsay SUBDIR += xcubes SUBDIR += xdeblock SUBDIR += xdemineur SUBDIR += xdesktopwaves SUBDIR += xdigger SUBDIR += xdino SUBDIR += xemeraldia SUBDIR += xevil SUBDIR += xeyesplus SUBDIR += xfireworks SUBDIR += xfrisk SUBDIR += xgalaga SUBDIR += xgalaga++ SUBDIR += xgalaga-sdl SUBDIR += xglk SUBDIR += xgospel SUBDIR += xhexagons SUBDIR += xhime SUBDIR += xinfocom SUBDIR += xinvaders SUBDIR += xinvaders3d SUBDIR += xisola SUBDIR += xjewel SUBDIR += xjig SUBDIR += xjump SUBDIR += xjumpx SUBDIR += xkoules SUBDIR += xlaby SUBDIR += xlennart SUBDIR += xlife SUBDIR += xlogical SUBDIR += xmahjongg SUBDIR += xmastermind SUBDIR += xmball SUBDIR += xmemory SUBDIR += xmille SUBDIR += xmine SUBDIR += xminehunter SUBDIR += xmines SUBDIR += xminesweep SUBDIR += xmlink SUBDIR += xmoto SUBDIR += xmris SUBDIR += xmulti SUBDIR += xneko SUBDIR += xoct SUBDIR += xoids SUBDIR += xoj SUBDIR += xonotic SUBDIR += xorgramana SUBDIR += xosmulti SUBDIR += xpacman SUBDIR += xpanex SUBDIR += xpat2 SUBDIR += xpenguins SUBDIR += xpilot SUBDIR += xpilot-ng-client SUBDIR += xpilot-ng-server SUBDIR += xpipeman SUBDIR += xpired SUBDIR += xpuyopuyo SUBDIR += xpuzzletama SUBDIR += xpyraminx SUBDIR += xqf SUBDIR += xrally SUBDIR += xrick SUBDIR += xrisk SUBDIR += xroach SUBDIR += xrobots SUBDIR += xrot SUBDIR += xrubik SUBDIR += xsc SUBDIR += xscavenger SUBDIR += xscorch SUBDIR += xscrabble SUBDIR += xshisen SUBDIR += xshogi SUBDIR += xskat SUBDIR += xskewb SUBDIR += xsokoban SUBDIR += xsoldier SUBDIR += xspacewarp SUBDIR += xspringies SUBDIR += xteddy SUBDIR += xtet42 SUBDIR += xtgyoretsu SUBDIR += xtic SUBDIR += xtriangles SUBDIR += xtris SUBDIR += xtrojka SUBDIR += xtron SUBDIR += xtruco SUBDIR += xtux SUBDIR += xvier SUBDIR += xvmahjongg SUBDIR += xvmines SUBDIR += xworm SUBDIR += xye SUBDIR += xzip SUBDIR += yadex SUBDIR += yahtzee SUBDIR += zangband SUBDIR += zatacka SUBDIR += zaz SUBDIR += zdoom SUBDIR += zephulor SUBDIR += zhlt SUBDIR += znibbles SUBDIR += zoom SUBDIR += ztrack .include Index: head/games/openbor/pkg-message =================================================================== --- head/games/openbor/pkg-message (revision 440513) +++ head/games/openbor/pkg-message (nonexistent) @@ -1,10 +0,0 @@ -To play a module copy its .pak file under ~/.openbor/Paks/ directory. -If only one file is there OpenBOR would run the module on startup, -otherwise module launcher would appear. - -In case a module has data/ directory unpacked you may need to run it -as follows: - - $ cd /path/to/module - $ cp -R ~/.openbor/Saves . - $ OPENBOR_USE_CURDIR=1 openbor Property changes on: head/games/openbor/pkg-message ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/games/openbor/Makefile =================================================================== --- head/games/openbor/Makefile (revision 440513) +++ head/games/openbor/Makefile (revision 440514) @@ -1,83 +1,99 @@ # $FreeBSD$ PORTNAME= openbor # Hint: svn revision is git rev-list --count ${GH_TAGNAME} -PORTVERSION= 3.0.r4432 +PORTVERSION?= 4504 CATEGORIES= games MAINTAINER= jbeich@FreeBSD.org COMMENT= Moddable fighting game engine (aka Beats of Rage) -LICENSE= BSD3CLAUSE GPLv2+ ISCL +LICENSE= BSD3CLAUSE GPLv2+ +.if ${PORTVERSION} >= 4134 +LICENSE+= ISCL +.endif LICENSE_COMB= multi LICENSE_FILE_BSD3CLAUSE=${WRKSRC}/LICENSE LICENSE_FILE_GPLv2+ = ${_LICENSE_STORE}/GPLv2 # source/gfxlib/hq2x.c LICENSE_FILE_ISCL= ${WRKSRC}/source/webmlib/nestegg/LICENSE -LIB_DEPENDS= libpng.so:graphics/png \ - libvpx.so:multimedia/libvpx +LIB_DEPENDS= libpng.so:graphics/png +.if ${PORTVERSION} >= 4134 +LIB_DEPENDS+= libvpx.so:multimedia/libvpx +.endif USE_GITHUB= yes GH_ACCOUNT= DCurrent -GH_TAGNAME= ba1eb4f # git v4432 is actually svn r4437 +GH_TAGNAME?= 4dfdb66 -USES= gmake pkgconfig +USES+= gmake pkgconfig +.if ${PORTVERSION} < 4433 USE_CSTD= gnu89 +.endif +.if ${PORTVERSION} < 4108 +USE_SDL= gfx +.else USE_SDL= gfx2 +.endif WRKSRC_SUBDIR= engine MAKE_ENV= BUILD_LINUX=1 SDKPATH="${LOCALBASE}" \ GCC_TARGET="${CONFIGURE_TARGET:S/amd64/x86_64/}" MAKE_ARGS= CC="${CC}" LIBRARIES="${LOCALBASE}/lib" \ TARGET_ARCH=${ARCH:S/i386/x86/} ARCHFLAGS="" \ TARGET_FINAL='${TARGET}' BUILD_MMX="" ECHO="${ECHO}" LDFLAGS+= -Wl,--as-needed # ogg, pthread, zlib -PLIST_FILES= bin/${PORTNAME} \ - share/pixmaps/${PORTNAME}.png +SUB_FILES= pkg-message +SUB_LIST= PKGBASE=${PKGBASE} +PLIST_FILES= bin/${PKGBASE} \ + share/pixmaps/${PKGBASE}.png +DOCSDIR= ${PREFIX}/share/doc/${PKGBASE} PORTDOCS= README -DESKTOP_ENTRIES="OpenBOR" \ +DESKTOP_ENTRIES="OpenBOR v3.0 Build ${PORTVERSION}" \ "" \ - "${PORTNAME}" \ - "${PORTNAME}" \ + "${PKGBASE}" \ + "${PKGBASE}" \ "Game;ArcadeGame;" \ "" OPTIONS_DEFINE= TREMOR OPTIONS_DEFAULT= ${MACHINE_CPU:Msoftfp:C/.+/TREMOR/} OPTIONS_DEFINE_i386= MMX OPTIONS_DEFAULT_i386= MMX # runtime detection MMX_BUILD_DEPENDS= yasm:devel/yasm MMX_MAKE_ARGS= BUILD_MMX=1 TREMOR_LIB_DEPENDS= libvorbisidec.so:audio/libtremor TREMOR_MAKE_ARGS= BUILD_TREMOR=1 BUILD_VORBIS="" TREMOR_LIB_DEPENDS_OFF= libvorbisfile.so:audio/libvorbis post-patch: @${REINPLACE_CMD} -e 's/ -O[0-9]//; s/ -g//; s/ -Werror//' \ -e 's/ -fomit-frame-pointer//' \ -e 's/ -freorder-blocks//' \ -e 's/ -Wl,-rpath,$$(LIBRARIES)//' \ -e '/echo/!s/ @/ /' \ -e 's/@echo/@$$(ECHO)/' \ -e 's/$$(LIBS)/$$(LDFLAGS) &/' \ ${WRKSRC}/Makefile + @${REINPLACE_CMD} -e 's/\.openbor/.${PKGBASE}/' \ + ${WRKSRC}/sdl/sdlport.c @${GREP} -Flr 'malloc.h' ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} \ 's,malloc\.h,stdlib.h,' @${REINPLACE_CMD} -e 's/^function \(.*\) {/\1() {/' \ - -e 's/^get_revnum$$/VERSION_BUILD=${PORTVERSION:E:S/^r//}/' \ + -e 's/^get_revnum$$/VERSION_BUILD=${PORTVERSION}/' \ ${WRKSRC}/version.sh do-configure: (cd ${WRKSRC} && ${SH} ./version.sh) do-install: ${INSTALL_PROGRAM} ${WRKSRC}/OpenBOR.elf \ - ${STAGEDIR}${PREFIX}/bin/${PORTNAME} + ${STAGEDIR}${PREFIX}/bin/${PKGBASE} ${INSTALL_DATA} ${WRKSRC}/resources/OpenBOR_Icon_128x128.png \ - ${STAGEDIR}${PREFIX}/share/pixmaps/${PORTNAME}.png + ${STAGEDIR}${PREFIX}/share/pixmaps/${PKGBASE}.png (cd ${WRKSRC} && ${COPYTREE_SHARE} \ "${PORTDOCS}" ${STAGEDIR}${DOCSDIR}) .include Index: head/games/openbor/distinfo =================================================================== --- head/games/openbor/distinfo (revision 440513) +++ head/games/openbor/distinfo (revision 440514) @@ -1,3 +1,3 @@ -TIMESTAMP = 1485387608 -SHA256 (DCurrent-openbor-3.0.r4432-ba1eb4f_GH0.tar.gz) = 0c26130127d1ec1d98c6c5e68b38a11df3e405ed7e43b7c61762f6ae862538c5 -SIZE (DCurrent-openbor-3.0.r4432-ba1eb4f_GH0.tar.gz) = 6087650 +TIMESTAMP = 1494074450 +SHA256 (DCurrent-openbor-4504-4dfdb66_GH0.tar.gz) = 1387fe221642c109d209f35c711222a6718028e7d435ef56f83668f90d69ca3c +SIZE (DCurrent-openbor-4504-4dfdb66_GH0.tar.gz) = 66890491 Index: head/games/openbor/files/patch-openbor.c =================================================================== --- head/games/openbor/files/patch-openbor.c (revision 440513) +++ head/games/openbor/files/patch-openbor.c (revision 440514) @@ -1,93 +1,84 @@ Fix potential crashes found by ASan/Clang/GCC Fix an infinite loop in lcmScriptDeleteMain() Avoid accidental rounding from abs() ---- openbor.c.orig 2016-12-22 13:02:02 UTC +--- openbor.c.orig 2017-04-22 14:20:08 UTC +++ openbor.c @@ -5810,7 +5810,7 @@ s_collision_attack **collision_alloc_att - size_t alloc_size; - - // Get amount of memory we'll need. -- alloc_size = sizeof(*result); -+ alloc_size = max_collisons * sizeof(*result); - - // Allocate memory and get pointer. - result = malloc(alloc_size); + size_t alloc_size; + + // Get amount of memory we'll need. +- alloc_size = sizeof(*result); ++ alloc_size = max_collisons * sizeof(*result); + + // Allocate memory and get pointer. + result = malloc(alloc_size); @@ -5859,7 +5859,7 @@ s_collision_body **collision_alloc_body_ - size_t alloc_size; - - // Get amount of memory we'll need. -- alloc_size = sizeof(*result); -+ alloc_size = max_collisons * sizeof(*result); - - // Allocate memory and get pointer. - result = malloc(alloc_size); + size_t alloc_size; + + // Get amount of memory we'll need. +- alloc_size = sizeof(*result); ++ alloc_size = max_collisons * sizeof(*result); + + // Allocate memory and get pointer. + result = malloc(alloc_size); @@ -8204,7 +8204,8 @@ size_t lcmScriptCopyBuffer(ArgList *argl - - size_t lcmScriptDeleteMain(char **buf) - { -- size_t len = 0, i = 0; -+ size_t len = 0; -+ long i = 0; - ptrdiff_t pos = 0; - char *newbuf = NULL; - + + size_t lcmScriptDeleteMain(char **buf) + { +- size_t len = 0, i = 0; ++ size_t len = 0; ++ long i = 0; + ptrdiff_t pos = 0; + char *newbuf = NULL; + @@ -13933,7 +13933,7 @@ void generate_basemap(int map_index, flo void load_level(char *filename) { - char *buf; + char *buf = NULL; size_t size, len, sblen; ptrdiff_t pos, oldpos; char *command; @@ -15210,6 +15210,11 @@ void bar(int x, int y, int value, int ma return; } + if (value < 0) + { + value = 0; + } + if (value > maxvalue) { value = maxvalue; -@@ -20471,7 +20476,7 @@ void common_dot() - entity *eOpp; //Owner of dot effect. - s_collision_attack attack; //Attack struct. +@@ -21710,8 +21716,8 @@ int reset_backpain(entity *ent) + if (ent->normaldamageflipdir == DIRECTION_RIGHT) ent->direction = DIRECTION_RIGHT; + else ent->direction = DIRECTION_LEFT; -- for(iIndex = 0; iIndex <= MAX_DOTS; iIndex++) //Loop through all DOT indexes. -+ for(iIndex = 0; iIndex < MAX_DOTS; iIndex++) //Loop through all DOT indexes. - { - iDot_time = self->dot_time[iIndex]; //Get expire time. - iDot_cnt = self->dot_cnt[iIndex]; //Get next tick time. -@@ -21710,8 +21716,8 @@ int reset_backpain(entity *ent) - if (ent->normaldamageflipdir == DIRECTION_RIGHT) ent->direction = DIRECTION_RIGHT; - else ent->direction = DIRECTION_LEFT; - -- if(ent->direction == DIRECTION_RIGHT) ent->velocity.x = -1*abs(ent->velocity.x); -- else ent->velocity.x = abs(ent->velocity.x); -+ if(ent->direction == DIRECTION_RIGHT) ent->velocity.x = -1*ABS(ent->velocity.x); -+ else ent->velocity.x = ABS(ent->velocity.x); - - return 1; - } +- if(ent->direction == DIRECTION_RIGHT) ent->velocity.x = -1*abs(ent->velocity.x); +- else ent->velocity.x = abs(ent->velocity.x); ++ if(ent->direction == DIRECTION_RIGHT) ent->velocity.x = -1*ABS(ent->velocity.x); ++ else ent->velocity.x = ABS(ent->velocity.x); + + return 1; + } @@ -25831,7 +25837,7 @@ int common_try_wander(entity *target, in mod = -mod; } - //if ((self->sortid / 100) % 2) + //if ((self->sortid / 100) % 2) - if (abs(rand32()) % 2) + if (rand32() % 2) { mod = 3 - mod; } @@ -34607,7 +34612,7 @@ void keyboard_setup(int player) strncpy(buttonnames[SDID_SPECIAL], "Special", 16); strncpy(buttonnames[SDID_START], "Start", 16); - strncpy(buttonnames[SDID_SCREENSHOT], "Screenshot", 16); + strncpy(buttonnames[SDID_SCREENSHOT], "Screenshot", 16); - strncpy(buttonnames[SDID_ESC], "Exit", 16); + //strncpy(buttonnames[SDID_ESC], "Exit", 16); savesettings(); bothnewkeys = 0; Index: head/games/openbor/files/patch-source_ramlib_ram.c =================================================================== --- head/games/openbor/files/patch-source_ramlib_ram.c (revision 440513) +++ head/games/openbor/files/patch-source_ramlib_ram.c (revision 440514) @@ -1,190 +1,190 @@ Implement Linux-like memory stats for BSDs ---- source/ramlib/ram.c.orig 2015-04-18 21:21:56 UTC +--- source/ramlib/ram.c.orig 2017-04-22 14:20:08 UTC +++ source/ramlib/ram.c @@ -25,6 +25,21 @@ #include #include #include +#elif defined(__DragonFly__) || defined(__FreeBSD__) || \ + defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) +#include +#include +#include +# if defined(__DragonFly__) +#include // struct kinfo_proc +#include // struct vmstats +# elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) +#include // struct kinfo_proc +# elif defined(__NetBSD__) +#include // struct uvmexp_sysctl +# elif defined(__OpenBSD__) +#include // struct uvmexp +# endif #elif LINUX #include #include @@ -48,7 +63,10 @@ static u64 systemRam = 0x00000000; -#if !(defined(WIN) || defined(LINUX) || defined(DARWIN)) +#if !(defined(WIN) || defined(LINUX) || defined(DARWIN) || \ + defined(__DragonFly__) || defined(__FreeBSD__) || \ + defined(__FreeBSD_kernel__) || defined(__NetBSD__) || \ + defined(__OpenBSD__)) static unsigned long elfOffset = 0x00000000; static unsigned long stackSize = 0x00000000; #endif @@ -56,7 +74,10 @@ static unsigned long stackSize = 0x00000 ///////////////////////////////////////////////////////////////////////////// // Symbols -#if !(defined(WIN) || defined(LINUX) || defined(DARWIN)) +#if !(defined(WIN) || defined(LINUX) || defined(DARWIN) || \ + defined(__DragonFly__) || defined(__FreeBSD__) || \ + defined(__FreeBSD_kernel__) || defined(__NetBSD__) || \ + defined(__OpenBSD__)) #if (__GNUC__ > 3) extern unsigned long _end; extern unsigned long _start; @@ -93,6 +114,49 @@ u64 getFreeRam(int byte_size) return 0; } return (u64)(((vms.inactive_count + vms.free_count) * size) / byte_size); +#elif defined(__DragonFly__) + struct vmstats vms; + size_t sz = sizeof(vms); + if (sysctlbyname("vm.vmstats", &vms, &sz, NULL, 0)) + { + return 0; + } + return (u64)((vms.v_free_count + vms.v_inactive_count + + vms.v_cache_count) * getpagesize()) / byte_size; +#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) + u_int v_free_count, v_inactive_count, v_cache_count; + size_t sz = sizeof(u_int); + v_free_count = v_inactive_count = v_cache_count = 0; + sysctlbyname("vm.stats.vm.v_free_count", + &v_free_count, &sz, NULL, 0); + sysctlbyname("vm.stats.vm.v_inactive_count", + &v_inactive_count, &sz, NULL, 0); + sysctlbyname("vm.stats.vm.v_cache_count", + &v_cache_count, &sz, NULL, 0); + return (u64)((v_free_count + v_inactive_count + v_cache_count) + * getpagesize()) / byte_size; +#elif defined(__NetBSD__) || defined(__OpenBSD__) +# if defined(__NetBSD__) +#undef VM_UVMEXP +#define VM_UVMEXP VM_UVMEXP2 +#define uvmexp uvmexp_sysctl +# else +#define filepages vnodepages +#define execpages vtextpages +# endif + int mib[] = { + CTL_VM, + VM_UVMEXP, + }; + u_int miblen = sizeof(mib) / sizeof(mib[0]); + struct uvmexp uvmexp; + size_t sz = sizeof(uvmexp); + if (sysctl(mib, miblen, &uvmexp, &sz, NULL, 0)) + { + return 0; + } + return (u64)((uvmexp.free + uvmexp.inactive + uvmexp.filepages + + uvmexp.execpages) * uvmexp.pagesize) / byte_size; #elif LINUX struct sysinfo info; sysinfo(&info); @@ -133,11 +197,29 @@ void setSystemRam() stat.dwLength = sizeof(MEMORYSTATUS); GlobalMemoryStatus(&stat); systemRam = stat.dwTotalPhys; -#elif DARWIN - u64 mem; - size_t len = sizeof(mem); - sysctlbyname("hw.memsize", &mem, &len, NULL, 0); - systemRam = mem; +#elif defined(DARWIN) || defined(__DragonFly__) || defined(__FreeBSD__) || \ + defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) +# if defined(HW_MEMSIZE) || defined(HW_PHYSMEM64) + uint64_t physmem; +# else + u_long physmem; +# endif + int mib[] = { + CTL_HW, +# if defined(HW_MEMSIZE) + HW_MEMSIZE, +# elif defined(HW_PHYSMEM64) + HW_PHYSMEM64, +# else + HW_PHYSMEM, +# endif + }; + size_t sz = sizeof(physmem); + if (sysctl(mib, 2, &physmem, &sz, NULL, 0)) + { + physmem = 0; + } + systemRam = physmem; #elif LINUX struct sysinfo info; sysinfo(&info); -@@ -180,7 +262,10 @@ void setSystemRam() +@@ -183,7 +265,10 @@ void setSystemRam() stackSize = 0x00000000; systemRam = getFreeRam(BYTES); #endif --#if !(defined(WIN) || defined(LINUX) || defined(DARWIN) || defined(SYMBIAN)) -+#if !(defined(WIN) || defined(LINUX) || defined(DARWIN) || defined(SYMBIAN) || \ +-#if !(defined(WIN) || defined(LINUX) || defined(DARWIN) || defined(SYMBIAN) || defined(VITA)) ++#if !(defined(WIN) || defined(LINUX) || defined(DARWIN) || defined(SYMBIAN) || defined(VITA) || \ + defined(__DragonFly__) || defined(__FreeBSD__) || \ + defined(__FreeBSD_kernel__) || defined(__NetBSD__) || \ + defined(__OpenBSD__)) stackSize = (int)&_end - (int)&_start + ((int)&_start - elfOffset); #endif getRamStatus(BYTES); @@ -212,6 +297,42 @@ u64 getUsedRam(int byte_size) return 0; } return info.resident_size / byte_size; +#elif defined(__DragonFly__) || defined(__FreeBSD__) || \ + defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) +# if defined(__NetBSD__) +#undef KERN_PROC +#define KERN_PROC KERN_PROC2 +#define KINFO_PROC struct kinfo_proc2 +# else +#define KINFO_PROC struct kinfo_proc +# endif +# if defined(__DragonFly__) +#define KP_RSS(kp) (kp.kp_vm_rssize * getpagesize()) +# elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) +#define KP_RSS(kp) (kp.ki_rssize * getpagesize()) +# elif defined(__NetBSD__) +#define KP_RSS(kp) (kp.p_vm_rssize * getpagesize()) +# elif defined(__OpenBSD__) +#define KP_RSS(kp) (kp.p_vm_rssize * getpagesize()) +# endif + int mib[] = { + CTL_KERN, + KERN_PROC, + KERN_PROC_PID, + getpid(), +# if defined(__NetBSD__) || defined(__OpenBSD__) + sizeof(KINFO_PROC), + 1, +# endif + }; + u_int miblen = sizeof(mib) / sizeof(mib[0]); + KINFO_PROC kp; + size_t sz = sizeof(KINFO_PROC); + if (sysctl(mib, miblen, &kp, &sz, NULL, 0)) + { + return 0; + } + return (u64)KP_RSS(kp) / byte_size; #elif LINUX unsigned long vm = 0; FILE *file = fopen("/proc/self/statm", "r"); Index: head/games/openbor/files/patch-source_utils.c =================================================================== --- head/games/openbor/files/patch-source_utils.c (nonexistent) +++ head/games/openbor/files/patch-source_utils.c (revision 440514) @@ -0,0 +1,11 @@ +--- source/utils.c.bak 2017-04-22 14:20:08 UTC ++++ source/utils.c +@@ -295,7 +295,7 @@ void *checkAlloc(void *ptr, size_t size, const char *f + "\n* Shutting Down *\n\n"); + writeToLogFile("Out of memory!\n"); + writeToLogFile("Allocation of size %i failed in function '%s' at %s:%i.\n", size, func, file, line); +-#ifndef WIN ++#if defined(__GLIBC__) || defined(ANDROID) || defined(VITA) + writeToLogFile("Memory usage at exit: %u\n", mallinfo().arena); + #endif + exit(2); Property changes on: head/games/openbor/files/patch-source_utils.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/games/openbor/files/pkg-message.in =================================================================== --- head/games/openbor/files/pkg-message.in (nonexistent) +++ head/games/openbor/files/pkg-message.in (revision 440514) @@ -0,0 +1,10 @@ +To play a game copy its .pak file under ~/.%%PKGBASE%%/Paks/ directory. +If only one file is there OpenBOR would run the game on startup, +otherwise game launcher would appear. + +In case a game has data/ directory unpacked you may need to run it +as follows: + + $ cd /path/to/game + $ cp -R ~/.%%PKGBASE%%/Saves . + $ OPENBOR_USE_CURDIR=1 %%PKGBASE%% Property changes on: head/games/openbor/files/pkg-message.in ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/games/openbor3482/Makefile =================================================================== --- head/games/openbor3482/Makefile (nonexistent) +++ head/games/openbor3482/Makefile (revision 440514) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +PORTVERSION= 3482 +PKGNAMESUFFIX= ${PORTVERSION} + +MASTERDIR= ${.CURDIR}/../openbor +PATCHDIR= ${.CURDIR}/files +DISTINFO_FILE= ${.CURDIR}/distinfo + +GH_TAGNAME= 2c1ecd7 + +.include "${MASTERDIR}/Makefile" Property changes on: head/games/openbor3482/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/games/openbor3482/distinfo =================================================================== --- head/games/openbor3482/distinfo (nonexistent) +++ head/games/openbor3482/distinfo (revision 440514) @@ -0,0 +1,3 @@ +TIMESTAMP = 1317171905 +SHA256 (DCurrent-openbor-3482-2c1ecd7_GH0.tar.gz) = 9e92378bd1f97f9d3c6af05faabe9372cbc36f82d41dfa4e1083f9ff2bcf51d3 +SIZE (DCurrent-openbor-3482-2c1ecd7_GH0.tar.gz) = 3024595 Property changes on: head/games/openbor3482/distinfo ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/games/openbor3482/files/patch-openbor.c =================================================================== --- head/games/openbor3482/files/patch-openbor.c (nonexistent) +++ head/games/openbor3482/files/patch-openbor.c (revision 440514) @@ -0,0 +1,30 @@ +Fix potential crashes found by ASan/Clang/GCC + +--- openbor.c.orig 2011-09-28 01:05:05 UTC ++++ openbor.c +@@ -8843,7 +8843,7 @@ char* llHandleCommandSpawnscript(ArgList + + + void load_level(char *filename){ +- char *buf; ++ char *buf = NULL; + size_t size, len; + ptrdiff_t pos, oldpos; + char *command; +@@ -9820,6 +9820,7 @@ void bar(int x, int y, int value, int ma + else if(pstatus->orientation==verticalbar) max = pstatus->sizey; + else return; + ++ if (value < 0) value = 0; + if (value > maxvalue) value = maxvalue; + + if(pstatus->type==valuebar) +@@ -12884,7 +12885,7 @@ void common_dot() + entity* eOpp; //Owner of dot effect. + s_attack attack; //Attack struct. + +- for(iIndex=0; iIndex<=MAX_DOTS; iIndex++) //Loop through all DOT indexes. ++ for(iIndex=0; iIndexdot_time[iIndex]; //Get expire time. + iDot_cnt = self->dot_cnt[iIndex]; //Get next tick time. Property changes on: head/games/openbor3482/files/patch-openbor.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/games/openbor3482/files/patch-sdl_sdlport.c =================================================================== --- head/games/openbor3482/files/patch-sdl_sdlport.c (nonexistent) +++ head/games/openbor3482/files/patch-sdl_sdlport.c (revision 440514) @@ -0,0 +1,30 @@ +Store settings under ~/.openbor instead of current directory + +--- sdl/sdlport.c.orig 2011-04-08 16:22:58 UTC ++++ sdl/sdlport.c +@@ -11,6 +11,9 @@ + #include "ram.h" + #include "video.h" + #include "menu.h" ++#include ++#include ++#include + + #ifdef DARWIN + #include +@@ -83,6 +86,15 @@ int main(int argc, char *argv[]) + + packfile_mode(0); + ++ if(!getenv("OPENBOR_USE_CURDIR")) ++ { ++ if (chdir(getenv("HOME")) != 0) ++ err(1, "cannot cd to $HOME"); ++ if (mkdir(".openbor", 0755) != 0 && errno != EEXIST) ++ err(1, "cannot mkdir $HOME/.openbor"); ++ if (chdir(".openbor") != 0) ++ err(1, "cannot cd to $HOME/.openbor"); ++ } + dirExists(paksDir, 1); + dirExists(savesDir, 1); + dirExists(logsDir, 1); Property changes on: head/games/openbor3482/files/patch-sdl_sdlport.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/games/openbor3482/files/patch-source_gamelib_packfile.c =================================================================== --- head/games/openbor3482/files/patch-source_gamelib_packfile.c (nonexistent) +++ head/games/openbor3482/files/patch-source_gamelib_packfile.c (revision 440514) @@ -0,0 +1,13 @@ +Reset seek position for BGM with more than 64 tracks + +--- source/gamelib/packfile.c.orig 2011-09-28 01:05:05 UTC ++++ source/gamelib/packfile.c +@@ -1137,7 +1137,7 @@ void packfile_music_read(fileliststruct *filelist, int + getBasePath(packfile, filelist[i].filename, 1); + if(stristr(packfile, ".pak")) + { +- memset(filelist[i].bgmTracks, 0, 256); ++ memset(filelist[i].bgmTracks, 0, sizeof(filelist[i].bgmTracks)); + filelist[i].nTracks = 0; + fd = fopen(packfile, "rb"); + if(fd == NULL) continue; Property changes on: head/games/openbor3482/files/patch-source_gamelib_packfile.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/games/openbor3482/files/patch-source_gamelib_packfile.h =================================================================== --- head/games/openbor3482/files/patch-source_gamelib_packfile.h (nonexistent) +++ head/games/openbor3482/files/patch-source_gamelib_packfile.h (revision 440514) @@ -0,0 +1,13 @@ +Don't crash with > 80 tracks. + +--- source/gamelib/packfile.h.orig 2011-04-08 16:22:58 UTC ++++ source/gamelib/packfile.h +@@ -40,7 +40,7 @@ typedef struct pnamestruct{ + typedef struct fileliststruct{ + char filename[128]; + int nTracks; +- char bgmFileName[80][256]; ++ char bgmFileName[256][80]; + int bgmTrack; + unsigned int bgmTracks[256]; + #ifdef SDL Property changes on: head/games/openbor3482/files/patch-source_gamelib_packfile.h ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/games/openbor3482/files/patch-source_ramlib_ram.c =================================================================== --- head/games/openbor3482/files/patch-source_ramlib_ram.c (nonexistent) +++ head/games/openbor3482/files/patch-source_ramlib_ram.c (revision 440514) @@ -0,0 +1,224 @@ +Implement Linux-like memory stats for BSDs + +--- source/ramlib/ram.c.orig 2011-04-08 16:22:58 UTC ++++ source/ramlib/ram.c +@@ -27,6 +27,21 @@ + #include + #include + #include ++#elif defined(__DragonFly__) || defined(__FreeBSD__) || \ ++ defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) ++#include ++#include ++#include ++# if defined(__DragonFly__) ++#include // struct kinfo_proc ++#include // struct vmstats ++# elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ++#include // struct kinfo_proc ++# elif defined(__NetBSD__) ++#include // struct uvmexp_sysctl ++# elif defined(__OpenBSD__) ++#include // struct uvmexp ++# endif + #elif LINUX + #include + #include +@@ -54,12 +69,22 @@ static u64 systemRam = 0x00000000; + #ifndef WIN + #ifndef XBOX + #ifndef LINUX ++#ifndef __DragonFly__ ++#ifndef __FreeBSD__ ++#ifndef __FreeBSD_kernel__ ++#ifndef __NetBSD__ ++#ifndef __OpenBSD__ + static unsigned long elfOffset = 0x00000000; + static unsigned long stackSize = 0x00000000; + #endif + #endif + #endif + #endif ++#endif ++#endif ++#endif ++#endif ++#endif + + ///////////////////////////////////////////////////////////////////////////// + // Symbols +@@ -68,6 +93,11 @@ static unsigned long stackSize = 0x00000 + #ifndef WIN + #ifndef XBOX + #ifndef LINUX ++#ifndef __DragonFly__ ++#ifndef __FreeBSD__ ++#ifndef __FreeBSD_kernel__ ++#ifndef __NetBSD__ ++#ifndef __OpenBSD__ + #if (__GNUC__ > 3) + extern unsigned long _end; + extern unsigned long _start; +@@ -81,6 +111,11 @@ extern unsigned long start; + #endif + #endif + #endif ++#endif ++#endif ++#endif ++#endif ++#endif + + ///////////////////////////////////////////////////////////////////////////// + // Functions +@@ -101,6 +136,49 @@ u64 getFreeRam(int byte_size) + if(host_page_size(hostPort, &size) != KERN_SUCCESS) return 0; + if(host_statistics(hostPort, HOST_VM_INFO, (host_info_t)&vms, &count) != KERN_SUCCESS) return 0; + return (u64)(((vms.inactive_count+vms.free_count)*size)/byte_size); ++#elif defined(__DragonFly__) ++ struct vmstats vms; ++ size_t sz = sizeof(vms); ++ if (sysctlbyname("vm.vmstats", &vms, &sz, NULL, 0)) ++ { ++ return 0; ++ } ++ return (u64)((vms.v_free_count + vms.v_inactive_count ++ + vms.v_cache_count) * getpagesize()) / byte_size; ++#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ++ u_int v_free_count, v_inactive_count, v_cache_count; ++ size_t sz = sizeof(u_int); ++ v_free_count = v_inactive_count = v_cache_count = 0; ++ sysctlbyname("vm.stats.vm.v_free_count", ++ &v_free_count, &sz, NULL, 0); ++ sysctlbyname("vm.stats.vm.v_inactive_count", ++ &v_inactive_count, &sz, NULL, 0); ++ sysctlbyname("vm.stats.vm.v_cache_count", ++ &v_cache_count, &sz, NULL, 0); ++ return (u64)((v_free_count + v_inactive_count + v_cache_count) ++ * getpagesize()) / byte_size; ++#elif defined(__NetBSD__) || defined(__OpenBSD__) ++# if defined(__NetBSD__) ++#undef VM_UVMEXP ++#define VM_UVMEXP VM_UVMEXP2 ++#define uvmexp uvmexp_sysctl ++# else ++#define filepages vnodepages ++#define execpages vtextpages ++# endif ++ int mib[] = { ++ CTL_VM, ++ VM_UVMEXP, ++ }; ++ u_int miblen = sizeof(mib) / sizeof(mib[0]); ++ struct uvmexp uvmexp; ++ size_t sz = sizeof(uvmexp); ++ if (sysctl(mib, miblen, &uvmexp, &sz, NULL, 0)) ++ { ++ return 0; ++ } ++ return (u64)((uvmexp.free + uvmexp.inactive + uvmexp.filepages ++ + uvmexp.execpages) * uvmexp.pagesize) / byte_size; + #elif LINUX + struct sysinfo info; + sysinfo(&info); +@@ -138,11 +216,29 @@ void setSystemRam() + stat.dwLength = sizeof(MEMORYSTATUS); + GlobalMemoryStatus(&stat); + systemRam = stat.dwTotalPhys; +-#elif DARWIN +- u64 mem; +- size_t len = sizeof(mem); +- sysctlbyname("hw.memsize", &mem, &len, NULL, 0); +- systemRam = mem; ++#elif defined(DARWIN) || defined(__DragonFly__) || defined(__FreeBSD__) || \ ++ defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) ++# if defined(HW_MEMSIZE) || defined(HW_PHYSMEM64) ++ uint64_t physmem; ++# else ++ u_long physmem; ++# endif ++ int mib[] = { ++ CTL_HW, ++# if defined(HW_MEMSIZE) ++ HW_MEMSIZE, ++# elif defined(HW_PHYSMEM64) ++ HW_PHYSMEM64, ++# else ++ HW_PHYSMEM, ++# endif ++ }; ++ size_t sz = sizeof(physmem); ++ if (sysctl(mib, 2, &physmem, &sz, NULL, 0)) ++ { ++ physmem = 0; ++ } ++ systemRam = physmem; + #elif LINUX + struct sysinfo info; + sysinfo(&info); +@@ -183,12 +279,22 @@ void setSystemRam() + #ifndef XBOX + #ifndef LINUX + #ifndef SYMBIAN ++#ifndef __DragonFly__ ++#ifndef __FreeBSD__ ++#ifndef __FreeBSD_kernel__ ++#ifndef __NetBSD__ ++#ifndef __OpenBSD__ + stackSize = (int)&_end - (int)&_start + ((int)&_start - elfOffset); + #endif + #endif + #endif + #endif + #endif ++#endif ++#endif ++#endif ++#endif ++#endif + getRamStatus(BYTES); + } + +@@ -215,6 +321,42 @@ u64 getUsedRam(int byte_size) + rval = task_info(task, TASK_BASIC_INFO, tptr, &tcnt); + if (!(rval == KERN_SUCCESS)) return 0; + return info.resident_size/byte_size; ++#elif defined(__DragonFly__) || defined(__FreeBSD__) || \ ++ defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) ++# if defined(__NetBSD__) ++#undef KERN_PROC ++#define KERN_PROC KERN_PROC2 ++#define KINFO_PROC struct kinfo_proc2 ++# else ++#define KINFO_PROC struct kinfo_proc ++# endif ++# if defined(__DragonFly__) ++#define KP_RSS(kp) (kp.kp_vm_rssize * getpagesize()) ++# elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ++#define KP_RSS(kp) (kp.ki_rssize * getpagesize()) ++# elif defined(__NetBSD__) ++#define KP_RSS(kp) (kp.p_vm_rssize * getpagesize()) ++# elif defined(__OpenBSD__) ++#define KP_RSS(kp) (kp.p_vm_rssize * getpagesize()) ++# endif ++ int mib[] = { ++ CTL_KERN, ++ KERN_PROC, ++ KERN_PROC_PID, ++ getpid(), ++# if defined(__NetBSD__) || defined(__OpenBSD__) ++ sizeof(KINFO_PROC), ++ 1, ++# endif ++ }; ++ u_int miblen = sizeof(mib) / sizeof(mib[0]); ++ KINFO_PROC kp; ++ size_t sz = sizeof(KINFO_PROC); ++ if (sysctl(mib, miblen, &kp, &sz, NULL, 0)) ++ { ++ return 0; ++ } ++ return (u64)KP_RSS(kp) / byte_size; + #elif LINUX + unsigned long vm = 0; + FILE *file = fopen("/proc/self/statm", "r"); Property changes on: head/games/openbor3482/files/patch-source_ramlib_ram.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/games/openbor3482/files/patch-sdl_menu.c =================================================================== --- head/games/openbor3482/files/patch-sdl_menu.c (nonexistent) +++ head/games/openbor3482/files/patch-sdl_menu.c (revision 440514) @@ -0,0 +1,13 @@ +Don't crash with empty Paks/ directory. + +--- sdl/menu.c.orig 2015-04-18 21:21:56 UTC ++++ sdl/menu.c +@@ -747,7 +747,7 @@ void Menu() + } + freeAllLogs(); + termMenu(); +- if(ctrl == 2) ++ if(dListTotal == 0 || ctrl == 2) + { + if (filelist) + { Property changes on: head/games/openbor3482/files/patch-sdl_menu.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/games/openbor3711/Makefile =================================================================== --- head/games/openbor3711/Makefile (nonexistent) +++ head/games/openbor3711/Makefile (revision 440514) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +PORTVERSION= 3711 +PKGNAMESUFFIX= ${PORTVERSION} + +MASTERDIR= ${.CURDIR}/../openbor +PATCHDIR= ${.CURDIR}/../openbor3482/files +DISTINFO_FILE= ${.CURDIR}/distinfo + +GH_TAGNAME= 6ec17fa + +.include "${MASTERDIR}/Makefile" Property changes on: head/games/openbor3711/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/games/openbor3711/distinfo =================================================================== --- head/games/openbor3711/distinfo (nonexistent) +++ head/games/openbor3711/distinfo (revision 440514) @@ -0,0 +1,3 @@ +TIMESTAMP = 1341365279 +SHA256 (DCurrent-openbor-3711-6ec17fa_GH0.tar.gz) = adaebfb09d48c6a3bef6c11fce038cac63070fb47660bf1c63b72ccaeaa20e0c +SIZE (DCurrent-openbor-3711-6ec17fa_GH0.tar.gz) = 3029909 Property changes on: head/games/openbor3711/distinfo ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/games/openbor3979/Makefile =================================================================== --- head/games/openbor3979/Makefile (nonexistent) +++ head/games/openbor3979/Makefile (revision 440514) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +PORTVERSION= 3979 +PKGNAMESUFFIX= ${PORTVERSION} + +MASTERDIR= ${.CURDIR}/../openbor +PATCHDIR= ${.CURDIR}/files +DISTINFO_FILE= ${.CURDIR}/distinfo + +GH_TAGNAME= 2bcf25b + +.include "${MASTERDIR}/Makefile" Property changes on: head/games/openbor3979/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/games/openbor3979/distinfo =================================================================== --- head/games/openbor3979/distinfo (nonexistent) +++ head/games/openbor3979/distinfo (revision 440514) @@ -0,0 +1,3 @@ +TIMESTAMP = 1377224669 +SHA256 (DCurrent-openbor-3979-2bcf25b_GH0.tar.gz) = 089a07e7a2ac921167687f8b21d637f85f1e6fcd56862f3d63be54e333358cc5 +SIZE (DCurrent-openbor-3979-2bcf25b_GH0.tar.gz) = 5683070 Property changes on: head/games/openbor3979/distinfo ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/games/openbor3979/files/patch-openbor.c =================================================================== --- head/games/openbor3979/files/patch-openbor.c (nonexistent) +++ head/games/openbor3979/files/patch-openbor.c (revision 440514) @@ -0,0 +1,34 @@ +Fix potential crashes found by ASan/Clang/GCC + +--- openbor.c.orig 2016-12-22 13:02:02 UTC ++++ openbor.c +@@ -13933,7 +13933,7 @@ void generate_basemap(int map_index, flo + + void load_level(char *filename) + { +- char *buf; ++ char *buf = NULL; + size_t size, len, sblen; + ptrdiff_t pos, oldpos; + char *command; +@@ -15210,6 +15210,11 @@ void bar(int x, int y, int value, int ma + return; + } + ++ if (value < 0) ++ { ++ value = 0; ++ } ++ + if (value > maxvalue) + { + value = maxvalue; +@@ -20471,7 +20476,7 @@ void common_dot() + entity *eOpp; //Owner of dot effect. + s_collision_attack attack; //Attack struct. + +- for(iIndex = 0; iIndex <= MAX_DOTS; iIndex++) //Loop through all DOT indexes. ++ for(iIndex = 0; iIndex < MAX_DOTS; iIndex++) //Loop through all DOT indexes. + { + iDot_time = self->dot_time[iIndex]; //Get expire time. + iDot_cnt = self->dot_cnt[iIndex]; //Get next tick time. Property changes on: head/games/openbor3979/files/patch-openbor.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/games/openbor3979/files/patch-sdl_sdlport.c =================================================================== --- head/games/openbor3979/files/patch-sdl_sdlport.c (nonexistent) +++ head/games/openbor3979/files/patch-sdl_sdlport.c (revision 440514) @@ -0,0 +1,31 @@ +Store settings under ~/.openbor instead of current directory + +--- sdl/sdlport.c.orig 2015-04-18 21:21:56 UTC ++++ sdl/sdlport.c +@@ -11,6 +11,9 @@ + #include "ram.h" + #include "video.h" + #include "menu.h" ++#include ++#include ++#include + + #ifdef DARWIN + #include +@@ -103,6 +105,16 @@ int main(int argc, char *argv[]) + #ifdef ANDROID + dirExists(rootDir, 1); + chdir(rootDir); ++#else ++ if(!getenv("OPENBOR_USE_CURDIR")) ++ { ++ if (chdir(getenv("HOME")) != 0) ++ err(1, "cannot cd to $HOME"); ++ if (mkdir(".openbor", 0755) != 0 && errno != EEXIST) ++ err(1, "cannot mkdir $HOME/.openbor"); ++ if (chdir(".openbor") != 0) ++ err(1, "cannot cd to $HOME/.openbor"); ++ } + #endif + dirExists(paksDir, 1); + dirExists(savesDir, 1); Property changes on: head/games/openbor3979/files/patch-sdl_sdlport.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/games/openbor3979/files/patch-source_ramlib_ram.c =================================================================== --- head/games/openbor3979/files/patch-source_ramlib_ram.c (nonexistent) +++ head/games/openbor3979/files/patch-source_ramlib_ram.c (revision 440514) @@ -0,0 +1,224 @@ +Implement Linux-like memory stats for BSDs + +--- source/ramlib/ram.c.orig 2013-12-29 14:05:10 UTC ++++ source/ramlib/ram.c +@@ -27,6 +27,21 @@ + #include + #include + #include ++#elif defined(__DragonFly__) || defined(__FreeBSD__) || \ ++ defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) ++#include ++#include ++#include ++# if defined(__DragonFly__) ++#include // struct kinfo_proc ++#include // struct vmstats ++# elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ++#include // struct kinfo_proc ++# elif defined(__NetBSD__) ++#include // struct uvmexp_sysctl ++# elif defined(__OpenBSD__) ++#include // struct uvmexp ++# endif + #elif LINUX + #include + #include +@@ -54,12 +69,22 @@ static u64 systemRam = 0x00000000; + #ifndef WIN + #ifndef XBOX + #ifndef LINUX ++#ifndef __DragonFly__ ++#ifndef __FreeBSD__ ++#ifndef __FreeBSD_kernel__ ++#ifndef __NetBSD__ ++#ifndef __OpenBSD__ + static unsigned long elfOffset = 0x00000000; + static unsigned long stackSize = 0x00000000; + #endif + #endif + #endif + #endif ++#endif ++#endif ++#endif ++#endif ++#endif + + ///////////////////////////////////////////////////////////////////////////// + // Symbols +@@ -68,6 +93,11 @@ static unsigned long stackSize = 0x00000 + #ifndef WIN + #ifndef XBOX + #ifndef LINUX ++#ifndef __DragonFly__ ++#ifndef __FreeBSD__ ++#ifndef __FreeBSD_kernel__ ++#ifndef __NetBSD__ ++#ifndef __OpenBSD__ + #if (__GNUC__ > 3) + extern unsigned long _end; + extern unsigned long _start; +@@ -81,6 +111,11 @@ extern unsigned long start; + #endif + #endif + #endif ++#endif ++#endif ++#endif ++#endif ++#endif + + ///////////////////////////////////////////////////////////////////////////// + // Functions +@@ -107,6 +142,49 @@ u64 getFreeRam(int byte_size) + return 0; + } + return (u64)(((vms.inactive_count + vms.free_count) * size) / byte_size); ++#elif defined(__DragonFly__) ++ struct vmstats vms; ++ size_t sz = sizeof(vms); ++ if (sysctlbyname("vm.vmstats", &vms, &sz, NULL, 0)) ++ { ++ return 0; ++ } ++ return (u64)((vms.v_free_count + vms.v_inactive_count ++ + vms.v_cache_count) * getpagesize()) / byte_size; ++#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ++ u_int v_free_count, v_inactive_count, v_cache_count; ++ size_t sz = sizeof(u_int); ++ v_free_count = v_inactive_count = v_cache_count = 0; ++ sysctlbyname("vm.stats.vm.v_free_count", ++ &v_free_count, &sz, NULL, 0); ++ sysctlbyname("vm.stats.vm.v_inactive_count", ++ &v_inactive_count, &sz, NULL, 0); ++ sysctlbyname("vm.stats.vm.v_cache_count", ++ &v_cache_count, &sz, NULL, 0); ++ return (u64)((v_free_count + v_inactive_count + v_cache_count) ++ * getpagesize()) / byte_size; ++#elif defined(__NetBSD__) || defined(__OpenBSD__) ++# if defined(__NetBSD__) ++#undef VM_UVMEXP ++#define VM_UVMEXP VM_UVMEXP2 ++#define uvmexp uvmexp_sysctl ++# else ++#define filepages vnodepages ++#define execpages vtextpages ++# endif ++ int mib[] = { ++ CTL_VM, ++ VM_UVMEXP, ++ }; ++ u_int miblen = sizeof(mib) / sizeof(mib[0]); ++ struct uvmexp uvmexp; ++ size_t sz = sizeof(uvmexp); ++ if (sysctl(mib, miblen, &uvmexp, &sz, NULL, 0)) ++ { ++ return 0; ++ } ++ return (u64)((uvmexp.free + uvmexp.inactive + uvmexp.filepages ++ + uvmexp.execpages) * uvmexp.pagesize) / byte_size; + #elif LINUX + struct sysinfo info; + sysinfo(&info); +@@ -147,11 +225,29 @@ void setSystemRam() + stat.dwLength = sizeof(MEMORYSTATUS); + GlobalMemoryStatus(&stat); + systemRam = stat.dwTotalPhys; +-#elif DARWIN +- u64 mem; +- size_t len = sizeof(mem); +- sysctlbyname("hw.memsize", &mem, &len, NULL, 0); +- systemRam = mem; ++#elif defined(DARWIN) || defined(__DragonFly__) || defined(__FreeBSD__) || \ ++ defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) ++# if defined(HW_MEMSIZE) || defined(HW_PHYSMEM64) ++ uint64_t physmem; ++# else ++ u_long physmem; ++# endif ++ int mib[] = { ++ CTL_HW, ++# if defined(HW_MEMSIZE) ++ HW_MEMSIZE, ++# elif defined(HW_PHYSMEM64) ++ HW_PHYSMEM64, ++# else ++ HW_PHYSMEM, ++# endif ++ }; ++ size_t sz = sizeof(physmem); ++ if (sysctl(mib, 2, &physmem, &sz, NULL, 0)) ++ { ++ physmem = 0; ++ } ++ systemRam = physmem; + #elif LINUX + struct sysinfo info; + sysinfo(&info); +@@ -199,12 +295,22 @@ void setSystemRam() + #ifndef XBOX + #ifndef LINUX + #ifndef SYMBIAN ++#ifndef __DragonFly__ ++#ifndef __FreeBSD__ ++#ifndef __FreeBSD_kernel__ ++#ifndef __NetBSD__ ++#ifndef __OpenBSD__ + stackSize = (int)&_end - (int)&_start + ((int)&_start - elfOffset); + #endif + #endif + #endif + #endif + #endif ++#endif ++#endif ++#endif ++#endif ++#endif + getRamStatus(BYTES); + } + +@@ -234,6 +340,42 @@ u64 getUsedRam(int byte_size) + return 0; + } + return info.resident_size / byte_size; ++#elif defined(__DragonFly__) || defined(__FreeBSD__) || \ ++ defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) ++# if defined(__NetBSD__) ++#undef KERN_PROC ++#define KERN_PROC KERN_PROC2 ++#define KINFO_PROC struct kinfo_proc2 ++# else ++#define KINFO_PROC struct kinfo_proc ++# endif ++# if defined(__DragonFly__) ++#define KP_RSS(kp) (kp.kp_vm_rssize * getpagesize()) ++# elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ++#define KP_RSS(kp) (kp.ki_rssize * getpagesize()) ++# elif defined(__NetBSD__) ++#define KP_RSS(kp) (kp.p_vm_rssize * getpagesize()) ++# elif defined(__OpenBSD__) ++#define KP_RSS(kp) (kp.p_vm_rssize * getpagesize()) ++# endif ++ int mib[] = { ++ CTL_KERN, ++ KERN_PROC, ++ KERN_PROC_PID, ++ getpid(), ++# if defined(__NetBSD__) || defined(__OpenBSD__) ++ sizeof(KINFO_PROC), ++ 1, ++# endif ++ }; ++ u_int miblen = sizeof(mib) / sizeof(mib[0]); ++ KINFO_PROC kp; ++ size_t sz = sizeof(KINFO_PROC); ++ if (sysctl(mib, miblen, &kp, &sz, NULL, 0)) ++ { ++ return 0; ++ } ++ return (u64)KP_RSS(kp) / byte_size; + #elif LINUX + unsigned long vm = 0; + FILE *file = fopen("/proc/self/statm", "r"); Property changes on: head/games/openbor3979/files/patch-source_ramlib_ram.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/games/openbor3979/files/patch-source_gamelib_packfile.c =================================================================== --- head/games/openbor3979/files/patch-source_gamelib_packfile.c (nonexistent) +++ head/games/openbor3979/files/patch-source_gamelib_packfile.c (revision 440514) @@ -0,0 +1,13 @@ +Reset seek position for BGM with more than 64 tracks + +--- source/gamelib/packfile.c.orig 2015-04-18 21:22:03 UTC ++++ source/gamelib/packfile.c +@@ -1399,7 +1399,7 @@ void packfile_music_read(fileliststruct + getBasePath(packfile, filelist[i].filename, 1); + if(stristr(packfile, ".pak")) + { +- memset(filelist[i].bgmTracks, 0, 256); ++ memset(filelist[i].bgmTracks, 0, sizeof(filelist[i].bgmTracks)); + filelist[i].nTracks = 0; + fd = fopen(packfile, "rb"); + if(fd == NULL) Property changes on: head/games/openbor3979/files/patch-source_gamelib_packfile.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/games/openbor3979/files/patch-source_scriptlib_Parser.c =================================================================== --- head/games/openbor3979/files/patch-source_scriptlib_Parser.c (nonexistent) +++ head/games/openbor3979/files/patch-source_scriptlib_Parser.c (revision 440514) @@ -0,0 +1,13 @@ +Make room for terminating NUL added by sprintf() + +--- source/scriptlib/Parser.c.orig 2016-12-15 02:16:03 UTC ++++ source/scriptlib/Parser.c +@@ -1828,7 +1828,7 @@ void Parser_Mult_expr2(Parser *pparser ) + + void Parser_Unary_expr(Parser *pparser ) + { +- static CHAR buf[MAX_TOKEN_LENGTH + 1]; ++ static CHAR buf[MAX_TOKEN_LENGTH + 2]; + Instruction *pInstruction = NULL; + + if (ParserSet_First(&(pparser->theParserSet), postfix_expr, pparser->theNextToken.theType )) Property changes on: head/games/openbor3979/files/patch-source_scriptlib_Parser.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/games/openbor3979/files/patch-source_gamelib_packfile.h =================================================================== --- head/games/openbor3979/files/patch-source_gamelib_packfile.h (nonexistent) +++ head/games/openbor3979/files/patch-source_gamelib_packfile.h (revision 440514) @@ -0,0 +1,13 @@ +Don't crash with > 80 tracks. + +--- source/gamelib/packfile.h.orig 2015-04-18 21:22:03 UTC ++++ source/gamelib/packfile.h +@@ -42,7 +42,7 @@ typedef struct fileliststruct + { + char filename[128]; + int nTracks; +- char bgmFileName[80][256]; ++ char bgmFileName[256][80]; + int bgmTrack; + unsigned int bgmTracks[256]; + #ifdef SDL Property changes on: head/games/openbor3979/files/patch-source_gamelib_packfile.h ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/games/openbor3979/files/patch-sdl_menu.c =================================================================== --- head/games/openbor3979/files/patch-sdl_menu.c (nonexistent) +++ head/games/openbor3979/files/patch-sdl_menu.c (revision 440514) @@ -0,0 +1,13 @@ +Don't crash with empty Paks/ directory. + +--- sdl/menu.c.orig 2015-04-18 21:21:56 UTC ++++ sdl/menu.c +@@ -747,7 +747,7 @@ void Menu() + } + freeAllLogs(); + termMenu(); +- if(ctrl == 2) ++ if(dListTotal == 0 || ctrl == 2) + { + if (filelist) + { Property changes on: head/games/openbor3979/files/patch-sdl_menu.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/games/openbor4432/Makefile =================================================================== --- head/games/openbor4432/Makefile (nonexistent) +++ head/games/openbor4432/Makefile (revision 440514) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +PORTVERSION= 4432 +PKGNAMESUFFIX= ${PORTVERSION} + +MASTERDIR= ${.CURDIR}/../openbor +PATCHDIR= ${.CURDIR}/files +DISTINFO_FILE= ${.CURDIR}/distinfo + +GH_TAGNAME= ba1eb4f + +.include "${MASTERDIR}/Makefile" Property changes on: head/games/openbor4432/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/games/openbor4432/distinfo =================================================================== --- head/games/openbor4432/distinfo (nonexistent) +++ head/games/openbor4432/distinfo (revision 440514) @@ -0,0 +1,3 @@ +TIMESTAMP = 1485387608 +SHA256 (DCurrent-openbor-4432-ba1eb4f_GH0.tar.gz) = 0c26130127d1ec1d98c6c5e68b38a11df3e405ed7e43b7c61762f6ae862538c5 +SIZE (DCurrent-openbor-4432-ba1eb4f_GH0.tar.gz) = 6087650 Property changes on: head/games/openbor4432/distinfo ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/games/openbor4432/files/patch-openbor.c =================================================================== --- head/games/openbor4432/files/patch-openbor.c (nonexistent) +++ head/games/openbor4432/files/patch-openbor.c (revision 440514) @@ -0,0 +1,93 @@ +Fix potential crashes found by ASan/Clang/GCC +Fix an infinite loop in lcmScriptDeleteMain() +Avoid accidental rounding from abs() + +--- openbor.c.orig 2016-12-22 13:02:02 UTC ++++ openbor.c +@@ -5810,7 +5810,7 @@ s_collision_attack **collision_alloc_att + size_t alloc_size; + + // Get amount of memory we'll need. +- alloc_size = sizeof(*result); ++ alloc_size = max_collisons * sizeof(*result); + + // Allocate memory and get pointer. + result = malloc(alloc_size); +@@ -5859,7 +5859,7 @@ s_collision_body **collision_alloc_body_ + size_t alloc_size; + + // Get amount of memory we'll need. +- alloc_size = sizeof(*result); ++ alloc_size = max_collisons * sizeof(*result); + + // Allocate memory and get pointer. + result = malloc(alloc_size); +@@ -8204,7 +8204,8 @@ size_t lcmScriptCopyBuffer(ArgList *argl + + size_t lcmScriptDeleteMain(char **buf) + { +- size_t len = 0, i = 0; ++ size_t len = 0; ++ long i = 0; + ptrdiff_t pos = 0; + char *newbuf = NULL; + +@@ -13933,7 +13933,7 @@ void generate_basemap(int map_index, flo + + void load_level(char *filename) + { +- char *buf; ++ char *buf = NULL; + size_t size, len, sblen; + ptrdiff_t pos, oldpos; + char *command; +@@ -15210,6 +15210,11 @@ void bar(int x, int y, int value, int ma + return; + } + ++ if (value < 0) ++ { ++ value = 0; ++ } ++ + if (value > maxvalue) + { + value = maxvalue; +@@ -20471,7 +20476,7 @@ void common_dot() + entity *eOpp; //Owner of dot effect. + s_collision_attack attack; //Attack struct. + +- for(iIndex = 0; iIndex <= MAX_DOTS; iIndex++) //Loop through all DOT indexes. ++ for(iIndex = 0; iIndex < MAX_DOTS; iIndex++) //Loop through all DOT indexes. + { + iDot_time = self->dot_time[iIndex]; //Get expire time. + iDot_cnt = self->dot_cnt[iIndex]; //Get next tick time. +@@ -21710,8 +21716,8 @@ int reset_backpain(entity *ent) + if (ent->normaldamageflipdir == DIRECTION_RIGHT) ent->direction = DIRECTION_RIGHT; + else ent->direction = DIRECTION_LEFT; + +- if(ent->direction == DIRECTION_RIGHT) ent->velocity.x = -1*abs(ent->velocity.x); +- else ent->velocity.x = abs(ent->velocity.x); ++ if(ent->direction == DIRECTION_RIGHT) ent->velocity.x = -1*ABS(ent->velocity.x); ++ else ent->velocity.x = ABS(ent->velocity.x); + + return 1; + } +@@ -25831,7 +25837,7 @@ int common_try_wander(entity *target, in + mod = -mod; + } + //if ((self->sortid / 100) % 2) +- if (abs(rand32()) % 2) ++ if (rand32() % 2) + { + mod = 3 - mod; + } +@@ -34607,7 +34612,7 @@ void keyboard_setup(int player) + strncpy(buttonnames[SDID_SPECIAL], "Special", 16); + strncpy(buttonnames[SDID_START], "Start", 16); + strncpy(buttonnames[SDID_SCREENSHOT], "Screenshot", 16); +- strncpy(buttonnames[SDID_ESC], "Exit", 16); ++ //strncpy(buttonnames[SDID_ESC], "Exit", 16); + + savesettings(); + bothnewkeys = 0; Property changes on: head/games/openbor4432/files/patch-openbor.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/games/openbor4432/files/patch-source_gamelib_packfile.c =================================================================== --- head/games/openbor4432/files/patch-source_gamelib_packfile.c (nonexistent) +++ head/games/openbor4432/files/patch-source_gamelib_packfile.c (revision 440514) @@ -0,0 +1,13 @@ +Reset seek position for BGM with more than 64 tracks + +--- source/gamelib/packfile.c.orig 2015-04-18 21:22:03 UTC ++++ source/gamelib/packfile.c +@@ -1399,7 +1399,7 @@ void packfile_music_read(fileliststruct + getBasePath(packfile, filelist[i].filename, 1); + if(stristr(packfile, ".pak")) + { +- memset(filelist[i].bgmTracks, 0, 256); ++ memset(filelist[i].bgmTracks, 0, sizeof(filelist[i].bgmTracks)); + filelist[i].nTracks = 0; + fd = fopen(packfile, "rb"); + if(fd == NULL) Property changes on: head/games/openbor4432/files/patch-source_gamelib_packfile.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/games/openbor4432/files/patch-source_scriptlib_Parser.c =================================================================== --- head/games/openbor4432/files/patch-source_scriptlib_Parser.c (nonexistent) +++ head/games/openbor4432/files/patch-source_scriptlib_Parser.c (revision 440514) @@ -0,0 +1,13 @@ +Make room for terminating NUL added by sprintf() + +--- source/scriptlib/Parser.c.orig 2016-12-15 02:16:03 UTC ++++ source/scriptlib/Parser.c +@@ -1828,7 +1828,7 @@ void Parser_Mult_expr2(Parser *pparser ) + + void Parser_Unary_expr(Parser *pparser ) + { +- static CHAR buf[MAX_TOKEN_LENGTH + 1]; ++ static CHAR buf[MAX_TOKEN_LENGTH + 2]; + Instruction *pInstruction = NULL; + + if (ParserSet_First(&(pparser->theParserSet), postfix_expr, pparser->theNextToken.theType )) Property changes on: head/games/openbor4432/files/patch-source_scriptlib_Parser.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/games/openbor4432/files/patch-source_gamelib_packfile.h =================================================================== --- head/games/openbor4432/files/patch-source_gamelib_packfile.h (nonexistent) +++ head/games/openbor4432/files/patch-source_gamelib_packfile.h (revision 440514) @@ -0,0 +1,13 @@ +Don't crash with > 80 tracks. + +--- source/gamelib/packfile.h.orig 2015-04-18 21:22:03 UTC ++++ source/gamelib/packfile.h +@@ -42,7 +42,7 @@ typedef struct fileliststruct + { + char filename[128]; + int nTracks; +- char bgmFileName[80][256]; ++ char bgmFileName[256][80]; + int bgmTrack; + unsigned int bgmTracks[256]; + #ifdef SDL Property changes on: head/games/openbor4432/files/patch-source_gamelib_packfile.h ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/games/openbor4432/files/patch-sdl_menu.c =================================================================== --- head/games/openbor4432/files/patch-sdl_menu.c (nonexistent) +++ head/games/openbor4432/files/patch-sdl_menu.c (revision 440514) @@ -0,0 +1,13 @@ +Don't crash with empty Paks/ directory. + +--- sdl/menu.c.orig 2015-04-18 21:21:56 UTC ++++ sdl/menu.c +@@ -747,7 +747,7 @@ void Menu() + } + freeAllLogs(); + termMenu(); +- if(ctrl == 2) ++ if(dListTotal == 0 || ctrl == 2) + { + if (filelist) + { Property changes on: head/games/openbor4432/files/patch-sdl_menu.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/games/openbor4432/files/patch-sdl_sdlport.c =================================================================== --- head/games/openbor4432/files/patch-sdl_sdlport.c (nonexistent) +++ head/games/openbor4432/files/patch-sdl_sdlport.c (revision 440514) @@ -0,0 +1,30 @@ +Store settings under ~/.openbor instead of current directory + +--- sdl/sdlport.c.orig 2015-04-18 21:21:56 UTC ++++ sdl/sdlport.c +@@ -11,6 +11,8 @@ + #include "ram.h" + #include "video.h" + #include "menu.h" ++#include ++#include + #include + #include + +@@ -103,6 +105,16 @@ int main(int argc, char *argv[]) + #ifdef ANDROID + dirExists(rootDir, 1); + chdir(rootDir); ++#else ++ if(!getenv("OPENBOR_USE_CURDIR")) ++ { ++ if (chdir(getenv("HOME")) != 0) ++ err(1, "cannot cd to $HOME"); ++ if (mkdir(".openbor", 0755) != 0 && errno != EEXIST) ++ err(1, "cannot mkdir $HOME/.openbor"); ++ if (chdir(".openbor") != 0) ++ err(1, "cannot cd to $HOME/.openbor"); ++ } + #endif + dirExists(paksDir, 1); + dirExists(savesDir, 1); Property changes on: head/games/openbor4432/files/patch-sdl_sdlport.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/games/openbor4432/files/patch-source_ramlib_ram.c =================================================================== --- head/games/openbor4432/files/patch-source_ramlib_ram.c (nonexistent) +++ head/games/openbor4432/files/patch-source_ramlib_ram.c (revision 440514) @@ -0,0 +1,190 @@ +Implement Linux-like memory stats for BSDs + +--- source/ramlib/ram.c.orig 2015-04-18 21:21:56 UTC ++++ source/ramlib/ram.c +@@ -25,6 +25,21 @@ + #include + #include + #include ++#elif defined(__DragonFly__) || defined(__FreeBSD__) || \ ++ defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) ++#include ++#include ++#include ++# if defined(__DragonFly__) ++#include // struct kinfo_proc ++#include // struct vmstats ++# elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ++#include // struct kinfo_proc ++# elif defined(__NetBSD__) ++#include // struct uvmexp_sysctl ++# elif defined(__OpenBSD__) ++#include // struct uvmexp ++# endif + #elif LINUX + #include + #include +@@ -48,7 +63,10 @@ + + static u64 systemRam = 0x00000000; + +-#if !(defined(WIN) || defined(LINUX) || defined(DARWIN)) ++#if !(defined(WIN) || defined(LINUX) || defined(DARWIN) || \ ++ defined(__DragonFly__) || defined(__FreeBSD__) || \ ++ defined(__FreeBSD_kernel__) || defined(__NetBSD__) || \ ++ defined(__OpenBSD__)) + static unsigned long elfOffset = 0x00000000; + static unsigned long stackSize = 0x00000000; + #endif +@@ -56,7 +74,10 @@ static unsigned long stackSize = 0x00000 + ///////////////////////////////////////////////////////////////////////////// + // Symbols + +-#if !(defined(WIN) || defined(LINUX) || defined(DARWIN)) ++#if !(defined(WIN) || defined(LINUX) || defined(DARWIN) || \ ++ defined(__DragonFly__) || defined(__FreeBSD__) || \ ++ defined(__FreeBSD_kernel__) || defined(__NetBSD__) || \ ++ defined(__OpenBSD__)) + #if (__GNUC__ > 3) + extern unsigned long _end; + extern unsigned long _start; +@@ -93,6 +114,49 @@ u64 getFreeRam(int byte_size) + return 0; + } + return (u64)(((vms.inactive_count + vms.free_count) * size) / byte_size); ++#elif defined(__DragonFly__) ++ struct vmstats vms; ++ size_t sz = sizeof(vms); ++ if (sysctlbyname("vm.vmstats", &vms, &sz, NULL, 0)) ++ { ++ return 0; ++ } ++ return (u64)((vms.v_free_count + vms.v_inactive_count ++ + vms.v_cache_count) * getpagesize()) / byte_size; ++#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ++ u_int v_free_count, v_inactive_count, v_cache_count; ++ size_t sz = sizeof(u_int); ++ v_free_count = v_inactive_count = v_cache_count = 0; ++ sysctlbyname("vm.stats.vm.v_free_count", ++ &v_free_count, &sz, NULL, 0); ++ sysctlbyname("vm.stats.vm.v_inactive_count", ++ &v_inactive_count, &sz, NULL, 0); ++ sysctlbyname("vm.stats.vm.v_cache_count", ++ &v_cache_count, &sz, NULL, 0); ++ return (u64)((v_free_count + v_inactive_count + v_cache_count) ++ * getpagesize()) / byte_size; ++#elif defined(__NetBSD__) || defined(__OpenBSD__) ++# if defined(__NetBSD__) ++#undef VM_UVMEXP ++#define VM_UVMEXP VM_UVMEXP2 ++#define uvmexp uvmexp_sysctl ++# else ++#define filepages vnodepages ++#define execpages vtextpages ++# endif ++ int mib[] = { ++ CTL_VM, ++ VM_UVMEXP, ++ }; ++ u_int miblen = sizeof(mib) / sizeof(mib[0]); ++ struct uvmexp uvmexp; ++ size_t sz = sizeof(uvmexp); ++ if (sysctl(mib, miblen, &uvmexp, &sz, NULL, 0)) ++ { ++ return 0; ++ } ++ return (u64)((uvmexp.free + uvmexp.inactive + uvmexp.filepages ++ + uvmexp.execpages) * uvmexp.pagesize) / byte_size; + #elif LINUX + struct sysinfo info; + sysinfo(&info); +@@ -133,11 +197,29 @@ void setSystemRam() + stat.dwLength = sizeof(MEMORYSTATUS); + GlobalMemoryStatus(&stat); + systemRam = stat.dwTotalPhys; +-#elif DARWIN +- u64 mem; +- size_t len = sizeof(mem); +- sysctlbyname("hw.memsize", &mem, &len, NULL, 0); +- systemRam = mem; ++#elif defined(DARWIN) || defined(__DragonFly__) || defined(__FreeBSD__) || \ ++ defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) ++# if defined(HW_MEMSIZE) || defined(HW_PHYSMEM64) ++ uint64_t physmem; ++# else ++ u_long physmem; ++# endif ++ int mib[] = { ++ CTL_HW, ++# if defined(HW_MEMSIZE) ++ HW_MEMSIZE, ++# elif defined(HW_PHYSMEM64) ++ HW_PHYSMEM64, ++# else ++ HW_PHYSMEM, ++# endif ++ }; ++ size_t sz = sizeof(physmem); ++ if (sysctl(mib, 2, &physmem, &sz, NULL, 0)) ++ { ++ physmem = 0; ++ } ++ systemRam = physmem; + #elif LINUX + struct sysinfo info; + sysinfo(&info); +@@ -180,7 +262,10 @@ void setSystemRam() + stackSize = 0x00000000; + systemRam = getFreeRam(BYTES); + #endif +-#if !(defined(WIN) || defined(LINUX) || defined(DARWIN) || defined(SYMBIAN)) ++#if !(defined(WIN) || defined(LINUX) || defined(DARWIN) || defined(SYMBIAN) || \ ++ defined(__DragonFly__) || defined(__FreeBSD__) || \ ++ defined(__FreeBSD_kernel__) || defined(__NetBSD__) || \ ++ defined(__OpenBSD__)) + stackSize = (int)&_end - (int)&_start + ((int)&_start - elfOffset); + #endif + getRamStatus(BYTES); +@@ -212,6 +297,42 @@ u64 getUsedRam(int byte_size) + return 0; + } + return info.resident_size / byte_size; ++#elif defined(__DragonFly__) || defined(__FreeBSD__) || \ ++ defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) ++# if defined(__NetBSD__) ++#undef KERN_PROC ++#define KERN_PROC KERN_PROC2 ++#define KINFO_PROC struct kinfo_proc2 ++# else ++#define KINFO_PROC struct kinfo_proc ++# endif ++# if defined(__DragonFly__) ++#define KP_RSS(kp) (kp.kp_vm_rssize * getpagesize()) ++# elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) ++#define KP_RSS(kp) (kp.ki_rssize * getpagesize()) ++# elif defined(__NetBSD__) ++#define KP_RSS(kp) (kp.p_vm_rssize * getpagesize()) ++# elif defined(__OpenBSD__) ++#define KP_RSS(kp) (kp.p_vm_rssize * getpagesize()) ++# endif ++ int mib[] = { ++ CTL_KERN, ++ KERN_PROC, ++ KERN_PROC_PID, ++ getpid(), ++# if defined(__NetBSD__) || defined(__OpenBSD__) ++ sizeof(KINFO_PROC), ++ 1, ++# endif ++ }; ++ u_int miblen = sizeof(mib) / sizeof(mib[0]); ++ KINFO_PROC kp; ++ size_t sz = sizeof(KINFO_PROC); ++ if (sysctl(mib, miblen, &kp, &sz, NULL, 0)) ++ { ++ return 0; ++ } ++ return (u64)KP_RSS(kp) / byte_size; + #elif LINUX + unsigned long vm = 0; + FILE *file = fopen("/proc/self/statm", "r"); Property changes on: head/games/openbor4432/files/patch-source_ramlib_ram.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property